Sunday, February 19, 2023

PowerShell Cheat sheet

 

PowerShell Cheat Sheet

While loop

while ($true) {
    Write-Host "Hello World"
}


Append to file

New-TimeSpan -Start @(Get-Process explorer)[0].StartTime | Out-File -Append -FilePath C:\tmp\log.txt


Keywords: PowerShell Quick Tips

REF:003


No comments:

Test page for code formatting

netsh advfirewall firewall add rule name = "RPC Endpoint Mapper" dir = in action = allow protocol = TCP localport = 1...