2017-05-19 8 views
0

Ich kann ein Automatisierungsmodul über ARM und das Portal hochladen und verwenden. Ich möchte das Modul per Powershell hochladen. Ist das möglich?Azure-Automatisierungsmodul über Powershell importieren

Mein Ziel ist es, ein benutzerdefiniertes Modul über unseren Build-Server in die azure Automation zu laden. Ist es besser, ARM oder Powershell zu verwenden, um das Modul vom Build Server auf azure hochzuladen?

Antwort

3

Verwenden Sie einfach Powershell, seine recht einfach:

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

von der Hilfe des Cmdlets genommen:

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. 
Verwandte Themen