2017-05-19 69 views
0

我可以通過ARM和Portal上傳和使用自動化模塊。我想通過PowerShell上傳模塊。這可能嗎?通過powershell導入Azure自動化模塊

我的目標是通過我們的構建服務器將自定義模塊上傳到azure自動化。使用ARM或PowerShell將模塊從構建服務器上傳到Azure會更好嗎?

回答

3

只需使用PowerShell的,它很容易:

The New-AzureRmAutomationModule cmdlet imports a module into Azure Automation. This command accepts a compressed file that has a .zip file 
name extension. The file contains a folder that includes a file that is one of the following types: 

- wps_2 module, which has a .psm1 or .dll file name extension 

- wps_2 module manifest, which has a .psd1 file name extension 


The name of the .zip file, the name of the folder, and the name of the file in the folder must be the same. 

Specify the .zip file as a URL that the Automation service can access. 

New-AzureRmAutomationModule -ResourceGroupName $rgName -AutomationAccountName $name -Name $moduleName -ContentLink $moduleUrl 

從cmdlet的幫助下采取