functions/function-Write-Log.ps1
function Write-Log { <# .SYNOPSIS Logs a message. .DESCRIPTION Logs a message. .PARAMETER Message The message to log. .EXAMPLE Write-Log -Message 'log message' .INPUTS [string] .OUTPUTS [string] #> param ( [Parameter(Mandatory, HelpMessage = 'Text to write to the log.')] [string]$Message ) [string]$date = ("[$((Get-Date).ToUniversalTime().ToString('MM/dd/yyyy HH:mm:ss')) UTC]") Write-Output "$date $Message" } |