Share via

Azure automation account powershell runbooks

Azuretech 95 Reputation points
2024-02-12T08:36:54.08+00:00

I am trying to update Azure automation account runbooks from powershell runtime version 7.1 to 7.2 as recommended as 7.1 is not supported by parent. but write-host is not working in version 7.2 and printing blank in 7.2 . it was fine with version 7.1 . example : below command runbooks showing no output. write-host "this is test" write-output is only working. is write-host not supported in 7.2 runtime? Please confirm. FYI :l I have upgraded all the required az modules

Azure Automation
Azure Automation

An Azure service that is used to automate, configure, and install updates across hybrid environments.

Windows for business | Windows Server | User experience | PowerShell

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 19,088 Reputation points Moderator
    2024-02-14T14:36:24.55+00:00

    @Azuretech The behavior of write-host in PS 7.2 is different from previous versions. Please use write-output instead of Write-Host. Thanks.

    Was this answer helpful?

    0 comments No comments

Your answer

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