IvoDijkgraaf
12/17/2014 - 9:46 AM

Write-Log

PowerShell: Write-Log

# Location of the Log File
$logFile = $env:TEMP + "\LogFile.log"

Function Write-Log
{
	Param ([string]$logString)

	Add-Content -Path $logFile -Value ($(get-date -f MM-dd-yyyy_HH_mm_ss) + ": " + $logString)
}