The Set-AzAutomationModule cmdlet updates a module in 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.
If you import a wps_2 module into Automation by using this cmdlet or the New-AzAutomationModule cmdlet, the operation is asynchronous.
The command finishes whether the import succeeds or fails.
To check whether it succeeded, run the following command:
PS C:\\\> $ModuleInstance = Get-AzAutomationModule -Name ModuleName
Check the ProvisioningState property for a value of Succeeded.
This command imports an updated version of an existing module named ContosoModule into the Automation account named Contoso17. The module is stored in an Azure blob in a storage account named contosostorage and a container named modules.
Parameters
-AutomationAccountName
Specifies the name of the Automation account for which this cmdlet updates a module.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.