question

LeoDArcy-1795 avatar image
0 Votes"
LeoDArcy-1795 asked bharathn-msft answered

Azure Automation Update Management Boolean Value is Broken

Within Azure Automation Update Management I have a script which requires a boolean value.

8962-aasetup.png

As you can see this was working on the 14/05/2020

8799-aaworking.png

However when attempting to rerun the same script with no changes this morning I was faced with failure. It appears that a change has been made to wrap all variables as strings which breaks the Boolean input.

8800-aablankfail.png


8963-aafalsestring.png


8897-aafalseexception.png

Is this a supported senario?

azure-automation
aasetup.png (29.9 KiB)
aaworking.png (10.8 KiB)
aablankfail.png (12.7 KiB)
aafalsestring.png (12.4 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@LeoDArcy-1795 - Apologies for delayed response on this, i have reached out to our internal team to better understand this issue. Will keep you updated as i get further information. Thank you


0 Votes 0 ·

@LeoDArcy-1795 - Can you please help confirm when the script was working were you using it as a pre-script in SUC or was just testing by running it elsewhere and it only breaks when added as a pre-script to SUC?


Alternatively, Can you please try to create script which accepts string as input as work around and see if it works.


For Example:


Param( [Parameter(Mandatory=$false,HelpMessage="Enter the value of what if ")] [String]$WhatIf = "False" ) if($WhatIf -eq "True"){ $NewWhatIf = $True }else{ $NewWhatIf = $False }

Write-Output $NewWhatIf.GetType()
Write-Output $NewWhatIf

Hope this information helps, please review and circle back if you have further issues.


0 Votes 0 ·

@LeoDArcy-1795 - Checking to see if you had a chance to look into the above work around and have any further queries. Thank you

0 Votes 0 ·

1 Answer

bharathn-msft avatar image
0 Votes"
bharathn-msft answered

@LeoDArcy-1795 - Create script which accepts string as input as work around and see if it works.


For Example:


 Param( [Parameter(Mandatory=$false,HelpMessage="Enter the value of what if ")] [String]$WhatIf = "False" ) if($WhatIf -eq "True"){ $NewWhatIf = $True }else{ $NewWhatIf = $False }
 Write-Output $NewWhatIf.GetType()
 Write-Output $NewWhatIf


Hope this information helps, please revert back if you have any further queries. Thank you.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.