Azure PowerShell (14) 批量導出Azure ASM ACL和ARM NSG配置信息
阿新 • • 發佈:2017-07-11
ron exp nag ssi 信息 blank man href target
《Windows Azure Platform 系列文章目錄》
最近有一個客戶需求,需要批量導出Azure Classic VM的ACL (Access Control List), 還有ARM VM的NSG (Network Security Group) 設置。
我花了一點時間,寫了一個PowerShell腳本,發布在我的GitHub上:
https://github.com/leizhang1984/AzureChinaPowerShell/blob/master/ARM/ExportACL-NSG/exportACL-NSG.ps1
發現Switch-AzureMode -Name AzureResourceManager
這句語句已經在最新的Azure PowerShell上不支持了。
所以這個PowerShell運行需要登錄兩次,第一次是執行ARM登錄,第二次是執行ASM登錄。
導出的csv文件保存在D盤根目錄下,文件名為:azureacl-nsg.csv
Azure PowerShell (14) 批量導出Azure ASM ACL和ARM NSG配置信息