I am trying to upload a custom DSC module to our Azure Automation account.
C:\Code\Epitec DSC [master ≡ +1 ~1 -1 !]> Set-AzureRmAutomationModule -Name "WindowsUpdate" -ContentLinkUri "{ContentURL}.zip" -ResourceGroupName "OI-Default-East-US" -AutomationAccountName "Epitec-Automation" -Verbose
Set-AzureRmAutomationModule : The Automation account was not found.
At line:1 char:1
+ Set-AzureRmAutomationModule -Name "WindowsUpdate" -ContentLinkUri "ht ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzureRmAutomationModule], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.SetAzureAutomationModule
Running the command Get-AzureRmAutomationAccount I am able to get the automation account
C:\Code\Epitec DSC [master ≡ +1 ~1 -1 !]> Get-AzureRmAutomationAccount -ResourceGroupName "OI-Default-East-US" -Name "Epitec-Automation"
SubscriptionId :
ResourceGroupName : OI-Default-East-US
AutomationAccountName : Epitec-Automation
Location : East US 2
State : Ok
Plan : Free
CreationTime : 12/29/2015 4:10:03 PM -05:00
LastModifiedTime : 10/12/2016 9:26:53 AM -04:00
LastModifiedBy : lsmith@epitec.com
Tags : {}
I've also tried piping it through like so
C:\Code\Epitec DSC [master ≡ +1 ~1 -1 !]> Get-AzureRmAutomationAccount -ResourceGroupName "OI-Default-East-US" -Name "Epitec-Automation" | Set-AzureRmAutomationModule -ContentLinkUri "{ContentURL}.zip" -Name "WindowsUpdate"
Set-AzureRmAutomationModule : The Automation account was not found.
At line:1 char:98
+ ... tomation" | Set-AzureRmAutomationModule -ContentLinkUri "https://epit ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Set-AzureRmAutomationModule], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.SetAzureAutomationModule
I have no issues uploading the zip file through the Azure portal site, however, I am trying to automate the process using PowerShell.