Hi there,
- Could you please check, your azure automation account has the required Module:Az.Automation to run this CMD-let?
- You can use pre\post scripts whetever you want to use. It's not tied with Update Management only
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to add pre-post script in update management schedule. I created a automation run book to host pre-post script (.ps1). I am using identity for authentication.
I updated below section-
New-AzAutomationSoftwareUpdateConfiguration -ResourceGroupName "$rg" -AutomationAccountName "$automationaccount"
-Schedule "$schedule" -Duration $(new-timespan -hours 2)
-Windows
-PreTaskRunbookName "precript" -PreTaskRunbookParameter @{Parameter1 ="abc"}
-AzureVMResourceId $machine `
-IncludedUpdateClassification $windows
1 - It's giving me below error -
The term '-PreTaskRunbookName' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Can you please suggest on this. -PreTaskRunbookName is as per Microsoft documenetation
2- also please advise if I can use a generic script to check the vm health which is taking input from a excel file and checking VM status . or will pre/post script take VM information from Update management directly . any specific format I need to follow for pre/post script
Hi there,