Write-Log.ps1

1
2
3
4
5
6
7
8
function Write-Log {
    param([string]$logstring)
    if ($Log) {
      Write-Debug -Message "Append ""$logstring"" to log file: ""$logfile"""
      Add-Content $logfile -Value $logstring
    }
  }