< Back
Set-AzureRmAutomationModule
Post
NAME Set-AzureRmAutomationModule
SYNOPSIS
Updates a module in Automation.
SYNTAX
Set-AzureRmAutomationModule [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-Name] <String> [-ContentLinkUri <Uri>]
[-ContentLinkVersion <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmAutomationModule 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-AzureRmAutomationModule 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-AzureRmAutomationModule -Name `ModuleName
Check the ProvisioningState property for a value of Succeeded.
PARAMETERS
-AutomationAccountName <String>
Specifies the name of the Automation account for which this cmdlet updates a module.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ContentLinkUri <Uri>
Specifies the URL of the .zip file that contains the new version of a module that this cmdlet imports.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ContentLinkVersion <String>
Specifies the version of the module to which this cmdlet updates Automation.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies the name of the module that this cmdlet imports.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of a resource group for which this cmdlet updates a module.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Automation.Model.Module
NOTES
Example 1: Update a module
PS C:\\>Set-AzureRmAutomationModule -AutomationAccountName "Contoso17" -Name "ContosoModule" -ContentLinkUri
"http://contosostorage.blob.core.windows ... Module.zip" -ContentLinkVersion "1.1" -ResourceGroupName "ResourceGroup01"
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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... tionmodule
Get-AzureRmAutomationModule
New-AzureRmAutomationModule
Remove-AzureRmAutomationModule
SYNOPSIS
Updates a module in Automation.
SYNTAX
Set-AzureRmAutomationModule [-ResourceGroupName] <String> [-AutomationAccountName] <String> [-Name] <String> [-ContentLinkUri <Uri>]
[-ContentLinkVersion <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmAutomationModule 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-AzureRmAutomationModule 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-AzureRmAutomationModule -Name `ModuleName
Check the ProvisioningState property for a value of Succeeded.
PARAMETERS
-AutomationAccountName <String>
Specifies the name of the Automation account for which this cmdlet updates a module.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ContentLinkUri <Uri>
Specifies the URL of the .zip file that contains the new version of a module that this cmdlet imports.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ContentLinkVersion <String>
Specifies the version of the module to which this cmdlet updates Automation.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies the name of the module that this cmdlet imports.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of a resource group for which this cmdlet updates a module.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Automation.Model.Module
NOTES
Example 1: Update a module
PS C:\\>Set-AzureRmAutomationModule -AutomationAccountName "Contoso17" -Name "ContosoModule" -ContentLinkUri
"http://contosostorage.blob.core.windows ... Module.zip" -ContentLinkVersion "1.1" -ResourceGroupName "ResourceGroup01"
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.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... tionmodule
Get-AzureRmAutomationModule
New-AzureRmAutomationModule
Remove-AzureRmAutomationModule