PowerShell
Active Directory
Get-SMBOpenFile
Basics
Expanding objects Much of the data we receive from cmdlets are objects that require furthe...
Errors and Solutions
This page contains a list of common PowerShell errors and their solutions. Invoke-WebRequest...
Firewall management
List firewall rules with ICMP in the DisplayName Get-NetFirewallRule | Where-Object DisplayName -...
Group Policy and PowerShell
You can manage Group Policy via PowerShell... who knew!? 🤣 Listing GPOs Get-GPO -All | Sort-O...
Querying Event Logs
I noticed that there is a huge speed difference between using an XML Query and PowerShell Get-Eve...
Snippets
  While a file exists or not # while a file exists While (Test-Path C:\Temp\File_I_Want_Gon...
Useful PowerShell Commands
Placeholder Select-String is the Grep equivalent Examples: # Searching for multiple patterns...
Windows Network Management from the command line
Get interface metrics # IPv4 - Display interfaces sorted by metric and alias Get-NetIPI...
Resource Usage
SYSTEMINFO You can cheat and use good old SYSTEMINFO from any command line. This will give y...
64-bit or 32-bit machine / ps host / process
Various ways of determining if the system is 64-bit or 32-bit [Source] # Get the path where pow...
Installed software via PowerShell
  Query registry for installed software There's more data in each registry than is being dis...