Azure automation account powershell runbooks

Azuretech 90 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.
1,329 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,867 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,891 Reputation points
    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.

    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.