====== Handy Azure Solutions ====== === Copy Network Security Groups === * [[https://github.com/kpatnayakuni/PowerShell/blob/master/Azure/Copy-AzNSGSecurityRules.ps1|Powershell script to copy Network Security Groups]] === List all regions === Get-AzLocation | select DisplayName, Location === Connect to Bastion Using Native Client === * [[https://docs.microsoft.com/en-us/azure/bastion/connect-native-client-windows]] === List Custom Policies === foreach ($sub in Get-AzSubscription -TenantId "7f2a3442-...") { Get-AzPolicyDefinition -SubscriptionId $sub.id | select -ExpandProperty Properties | where {$_.PolicyType -eq "Custom"} | select DisplayName -ExpandProperty Metadata | select DisplayName, createdOn, updatedOn | fl }