Reference LibraryNSGNSGAzure Network Security Group Copy NSG rules from existing NSG to create new NSG using Powershell: 1 2 3 4 5 6 7 8 9 10 11 12 # Connect and set source subscription Connect-AzAccount Set-AzContext -SubscriptionId "source-subscription-id" # Get source NSG $sourceNSG = Get-AzNetworkSecurityGroup -ResourceGroupName "source-rg" -Name "source-nsg-name" # Switch to target subscription Set-AzContext -SubscriptionId "target-subscription-id" # Create new NSG with same rules $newNSG = New-AzNetworkSecurityGroup -ResourceGroupName "target-rg" -Name "new-nsg-name" -Location "target-location" -SecurityRules $sourceNSG.SecurityRulesRDSSftp