Open
Description
Using Write-Message for output will cause issues where users also have a Write-Message command in their session.
It also restricts the ability to provide granular functionality for outputting messages
It also restricts the type of logging available.
I suggest following dbatools and dbachecks example and using PSFramework for logging, this will enable exactly the same current functionality for output to the user, whilst adding further opportunities for logging (SQL Database, Azure blob storage, KQL, Log Analytics for example) which will be highly beneficial in automated processes