Lerch Web Wiki

Random, erratic, no responsibility is taken for the correctness of this information

User Tools

Site Tools


powershell:basics:functions

This is an old revision of the document!


Usefull functions for different tasks

Log2File.ps1
function Log2File{
    param(
	[string]$log,
	[string]$text
    )
    "$(Get-Date -Format "yyyyMMdd-HH:mm:ss"):`t$text" | Out-File -FilePath $log -Append
    Write-Verbose "$(Get-Date -Format "yyyyMMdd-HH:mm:ss"):`t$text" 
}
.ps1
 
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
powershell/basics/functions.1487856760.txt.gz · Last modified: 2017/02/23 14:32 by marcus