Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write-Host replaced by Write-Error for Azure Automation Accounts #4943

Closed
jackpoz opened this issue Aug 1, 2024 · 0 comments · Fixed by #4950 or #4998
Closed

Write-Host replaced by Write-Error for Azure Automation Accounts #4943

jackpoz opened this issue Aug 1, 2024 · 0 comments · Fixed by #4950 or #4998

Comments

@jackpoz
Copy link
Contributor

jackpoz commented Aug 1, 2024

Description

Please consider replacing Write-Host -Object '[ERROR] ....' -ForegroundColor Red occurrences with Write-Error or similar as Write-Host is not supported by Azure Automation Account runbooks and the error is never displayed or logged.

I spent a couple of hours trying to figure out why Export-M365DSCConfiguration was not creating any file and it was missing a parameter (that was not needed when running it locally).

It would be beneficial to avoid Write-Host altogether.

Harleycox added a commit to Harleycox/Microsoft365DSC that referenced this issue Aug 23, 2024
relating to pull microsoft#4943 requested by ykuijs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant