If you get the following error when trying to logon to your CloudShell then this simple fix will resolve your error: Fix: rm -rf ~/.local/share/powershell/Modules
Tag: Powershell
Deploy Azure Infrastructure using PowerShell scripts, GitHub and Azure DevOps pipelines
This blog is written on a 100 level, explaining how to use the most simplistic tooling to deploy Azure resources using PowerShell scripts, GitHub and deployed via Azure DevOps pipelines with continuous integration. Deployment Plan Step 1 – PowerShell scripts Step 2 – Github.com remote repository Step 3 – Upload PowerShell scripts Step 4 –… Continue reading Deploy Azure Infrastructure using PowerShell scripts, GitHub and Azure DevOps pipelines
Exporting Registered Apps expiring secrets and certificates
This blog post aims to streamline the manual extraction of your Registered Applications whose secrets are either nearing expiration or have already expired. The process utilizes a PowerShell script and concludes by exporting the results to a CSV file. Step 1 – Prepare an output folder This will become the target folder into which your… Continue reading Exporting Registered Apps expiring secrets and certificates
Export app registrations with expiring secrets and certificates
Copy the entire contents into a ps1 file and dont edit anything. Reference: https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/scripts/powershell-export-apps-with-expiring-secrets
Storage Account + Container + Get account keys
login to tenant Install-Module AzImport-Module AzConnect-AzAccount change subscriptions Set-AzContext -Subscription “5cf7452e-….” Create a new Resource Group container $ResourceGroupName = “allen-tf-sandbox”$location = “southafricanorth”New-AzResourceGroup -Name $ResourceGroupName-Location $location -Tag @{CustomerName=”Customer01″;AutoShutdownSchedule=”None”; `Environment=”sandbox”;} st.acc variables $StorageAccName = ‘devopssandboxterraf01’$StorageType = ‘Standard_LRS’ create your storage account New-AzStorageAccount -ResourceGroupName $ResourceGroupName-Name $StorageAccName -Type $StorageType-Location $location -Tag @{CustomerName=”Customer01″;AutoShutdownSchedule=”None”; `Environment=”sandbox”;} create your container $azstorageacc = Get-AzStorageAccount… Continue reading Storage Account + Container + Get account keys
Deploying an Azure Database for PostgreSQL flexible server
This powershell script will deploy the following elements of your PostgreSQL server: An Azure Database for PostgreSQL flexible server, With subnet integration, With a private DNS zone, With public access denied with firewall enablement, High availability enabled,
Azure Front Door deployment
The aim of this blog is to simplify the basic deployment of your Azure Front Door. This blog unpacks the provisioning a premium tier AFD and connecting the Azure Front door to an Azure external load balancer backend (which will become the AFD orgin). The next blog will explain how to configure private endpoints, as… Continue reading Azure Front Door deployment
How to quickly create a dummy / self-signed certificate for sandbox testing
This is quick, simple recipe on how to creat a self-signed .pfx certificate for your sandbox in 1 minute using powershell. Step 1 – Create a new a self-signed certificate The New-SelfSignedCertificate cmdlet enables you to create a self-signed certificate. $cert = New-SelfSignedCertificate -DnsName www.domainname.co.za `-Type CodeSigning -CertStoreLocation Cert:\CurrentUser\My Step 2 – Verify that the… Continue reading How to quickly create a dummy / self-signed certificate for sandbox testing
Azure Internal load balancer
Load balancing refers to the practice of evenly distributing traffic load (incoming network traffic) across a group of backend resources or servers. Azure Load Balancer operates at layer 4 of the Open Systems Interconnection (OSI) model. The Azure load balancer the single point of contact for clients. Load balancers distribute inbound flows that arrive at the… Continue reading Azure Internal load balancer
Provision a Storage Account
This script deploys a simple Azure storage account v2 with LRS.