PowerShell Snippets — Hub

Ctrl+F: snippet index · external wiki · Get-Item · Get-ItemProperty · registry

One command / one scenario per note — not full cmdlet docs. For cmdlet reference see PowerShell Cmdlets. For CMD see Windows CMD - Powershell Commands.

Add new snippets as .md files in this folder and link them below.


📌 Snippets in this folder

NoteWhat it does
AD Sync - service and miiserver enumAzure AD Connect Sync — service registry key + miiserver.exe properties

(Add more files here as you collect commands.)


📌 External references (detailed Windows / PowerShell wikis)

Use these when you need every parameter, syntax variant, or cmdlet you do not have a vault note for yet.

ResourceBest forURL
SS64 PowerShellAlphabetical cmdlet cheat sheet — closest to a full wikiss64.com/ps
Microsoft Learn — PowerShellOfficial docs, providers, -Path syntaxPowerShell documentation
Get-ItemFiles, registry keys, certificatesGet-Item (Microsoft)
Get-ItemPropertyRegistry values, file metadataGet-ItemProperty (Microsoft)
Registry providerHKLM:\ paths, drives, wildcardsAbout Registry provider
Format-List-Property * -Force output controlFormat-List (Microsoft)
Get-ServiceWindows services (alternative to registry)Get-Service (Microsoft)

Vault deep dives: PowerShell Cmdlets · Registry Hives and Linux Equivalents · Active Directory Cmdlets · gci


📌 Snippet template (new notes)

---
category: windows-commands
summary: One-line description of what the command finds.
tags:
- powershell
- snippet
---
 
# Title
 
## Command
 
\`\`\`powershell
# command here
\`\`\`
 
## What it does
 
## When to use (OSCP)
 
## Related

📌 Common snippet patterns

# Registry key object (service config lives here)
Get-Item -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\ServiceName'
 
# Registry values under a key
Get-ItemProperty -Path 'HKLM:\SOFTWARE\...'
 
# All properties on a file (version, path, ACL hints)
Get-ItemProperty -Path 'C:\Path\file.exe' | Format-List -Property * -Force
 
# Service via cmdlet (simpler than registry)
Get-Service -Name ADSync
Get-CimInstance Win32_Service -Filter "Name='ADSync'"