Powershell
1
Get-Process notepad | Stop-Process -Force
2
# Kill process
3
4
$p = Get-Process notepad
5
$p | gm -foce
6
# Explore the methods and properties for an object
7
$p.CloseMainWindows
8
# Call specific function
9
Copied!

Grep

1
Select-String -Path "audit.log" -Pattern "logon failed" -Context 2, 3
2
# display lines before /after match
Copied!
Last modified 1yr ago
Copy link