Azure Automation Update Management Boolean Value is Broken

Leo D'Arcy 1 Reputation point
2020-06-01T12:33:30.513+00:00

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
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,264 questions
{count} votes

1 answer

Sort by: Most helpful
  1. bharathn-msft 5,096 Reputation points Microsoft Employee
    2020-06-23T17:09:33.607+00:00

    @Leo D'Arcy - 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.