100+ PowerShell Commands A-Z for Windows Administration & Troubleshooting
A practical PowerShell reference covering command discovery, files, folders, processes, Windows services, system information, networking, DNS, TCP connections, storage, event logs, users, scheduled tasks, registry, security and Microsoft Defender.
Before Running PowerShell Commands
Some commands only display information, while others can modify, stop, remove or delete Windows resources.
Read the purpose of a command before running it. Commands that change services, network settings, registry values, permissions, users, drivers or files may require Administrator privileges.
Some commands are available only when the required Windows or PowerShell module is installed.
WMIC to PowerShell Replacements
If WMIC is missing or no longer recognized in Windows 11, use modern PowerShell CIM commands instead.
View WMIC to PowerShell CommandsPowerShell Command Categories
1. PowerShell Help & Command Discovery
Get-Help
Use: Read help for a PowerShell command.
Get-Help -Examples
Use: Show examples for a command.
Get-Help -Full
Use: Display full help information.
Update-Help
Use: Download updated PowerShell help files where supported.
Get-Command
Use: List available PowerShell commands.
Get-Command *network*
Use: Find commands containing a word.
Get-Module
Use: Display currently loaded PowerShell modules.
Get-Module -ListAvailable
Use: Show installed modules available to PowerShell.
Import-Module
Use: Load a PowerShell module.
Get-Alias
Use: Show PowerShell aliases.
2. Pipeline, Filtering & Output Commands
Where-Object
Use: Filter PowerShell objects.
Select-Object
Use: Select specific properties from objects.
Sort-Object
Use: Sort output.
Measure-Object
Use: Count or calculate values from objects.
ForEach-Object
Use: Perform an action for each pipeline object.
Format-Table
Use: Display output as a table.
Format-List
Use: Display object properties vertically.
Out-File
Use: Save command output to a text file.
Export-Csv
Use: Export objects to CSV.
ConvertTo-Json
Use: Convert PowerShell objects into JSON.
3. PowerShell Files & Folders Commands
Get-ChildItem
Use: List files and folders.
Get-ChildItem -Recurse
Use: Search folders recursively.
Get-Item
Use: Display a specific file, folder or provider item.
New-Item
Use: Create a new file, folder or other provider item.
Copy-Item
Use: Copy files or folders.
Move-Item
Use: Move a file or folder.
Rename-Item
Use: Rename a file or folder.
Remove-Item
Use: Delete a file, folder or supported provider item.
Caution: Verify the path before using Remove-Item.
Test-Path
Use: Check whether a path exists.
Get-Content
Use: Read the contents of a text file.
Set-Content
Use: Write or replace file content.
Add-Content
Use: Append content to a file.
Clear-Content
Use: Remove file content without deleting the file.
Get-FileHash
Use: Calculate a cryptographic hash for a file.
Get-Location
Use: Show the current PowerShell location.
Set-Location
Use: Change the current directory.
4. PowerShell Process Commands
Get-Process
Use: Show running processes.
Get-Process -Id
Use: Find a process by PID.
Get-Process by Name
Use: Find a process by executable name.
Stop-Process
Use: Stop a running process.
Stop-Process -Force
Use: Force a process to stop.
Start-Process
Use: Start an application or executable.
Start-Process as Administrator
Use: Start a process elevated.
5. Windows Service Commands
Get-Service
Use: List Windows services.
Get-Service Spooler
Use: Check the Print Spooler service.
Start-Service
Use: Start a Windows service.
Stop-Service
Use: Stop a Windows service.
Restart-Service
Use: Restart a service.
Set-Service
Use: Change supported service settings.
6. Computer & Windows System Information
Get-ComputerInfo
Use: Display detailed computer and Windows information.
Get-CimInstance Win32_OperatingSystem
Use: Display operating-system details.
Get-CimInstance Win32_ComputerSystem
Use: Display computer manufacturer, model and memory information.
Get-CimInstance Win32_BIOS
Use: Display BIOS information.
Get Computer Serial Number
Use: Retrieve the serial number stored in BIOS/firmware.
Get-CimInstance Win32_Processor
Use: Display CPU information.
Get-CimInstance Win32_PhysicalMemory
Use: Show physical RAM module information.
Get-Date
Use: Display current system date and time.
Get-TimeZone
Use: Show the configured Windows time zone.
7. PowerShell Network Troubleshooting Commands
Test-Connection
Use: Test basic network connectivity using ICMP.
Test-NetConnection
Use: Test connectivity and collect network diagnostic information.
Test a TCP Port
Use: Check whether a remote TCP port can be reached.
Get-NetAdapter
Use: List Windows network adapters.
Get-NetAdapterStatistics
Use: Show network adapter packet and byte statistics.
Get-NetIPAddress
Use: Show IPv4 and IPv6 address configuration.
Get-NetIPConfiguration
Use: Show interface, IP address, gateway and DNS information.
Get-NetRoute
Use: Display the Windows IP routing table.
Get-NetTCPConnection
Use: Show current TCP connections.
Show Established TCP Connections
Use: Filter for active established TCP sessions.
Get-NetUDPEndpoint
Use: Show local UDP endpoints.
Get-NetConnectionProfile
Use: Display Windows network profile information.
8. PowerShell DNS Troubleshooting Commands
Resolve-DnsName
Use: Perform a DNS lookup.
Resolve-DnsName A Record
Use: Query IPv4 DNS records.
Resolve-DnsName MX
Use: Check mail-exchanger records for a domain.
Get-DnsClientServerAddress
Use: Display DNS servers configured on network interfaces.
Clear-DnsClientCache
Use: Clear the Windows DNS client resolver cache.
9. PowerShell Disk & Storage Commands
Get-Volume
Use: Show Windows volumes and available storage.
Get-Disk
Use: Display disks visible to Windows.
Get-Partition
Use: Display disk partitions.
Get-PhysicalDisk
Use: Display physical disk information where supported.
Get-PSDrive
Use: Show PowerShell drives and free/used space where supported.
Check C Drive Free Space
Use: Display free and used space for the C drive.
Find Large Files
Use: Find the largest files under a folder.
Measure Folder File Size
Use: Calculate the combined size of files under a folder.
Get Storage-Specific CIM Information
Use: Query logical disk information.
10. Windows Event Log Commands
Get-WinEvent
Use: Read Windows event logs.
Application Events
Use: Read recent Application log events.
Security Events
Use: Read Security log events when permissions allow.
Filter Error Events
Use: Search recent System errors.
Get-EventLog
Use: Older Windows PowerShell event-log command.
11. Windows Local User & Group Commands
Get-LocalUser
Use: Show local user accounts.
Get-LocalGroup
Use: Show local Windows groups.
Get-LocalGroupMember
Use: Display members of a local group.
New-LocalUser
Use: Create a local Windows user account.
Add-LocalGroupMember
Use: Add an account to a local group.
Disable-LocalUser
Use: Disable a local Windows user.
12. Windows Scheduled Task Commands
Get-ScheduledTask
Use: List Windows scheduled tasks.
Get-ScheduledTaskInfo
Use: Show runtime information about a scheduled task.
Start-ScheduledTask
Use: Manually start a scheduled task.
Stop-ScheduledTask
Use: Stop a running scheduled task.
13. PowerShell Registry Commands
Get-ChildItem Registry
Use: Browse registry keys using the PowerShell registry provider.
Get-ItemProperty
Use: Read registry values or other item properties.
Set-ItemProperty
Use: Change a registry or supported provider property.
New-Item Registry Key
Use: Create a new registry key.
New-ItemProperty
Use: Create a registry value.
Remove-ItemProperty
Use: Remove a registry value.
14. PowerShell Security & Permission Commands
Get-Acl
Use: Read access-control information for a file, folder or other supported item.
Set-Acl
Use: Apply an ACL to a supported item.
Set-Acl can change permissions. Use only after reviewing the ACL.
Get-AuthenticodeSignature
Use: Check the Authenticode signature of a file.
Get-ExecutionPolicy
Use: Display the current PowerShell execution policy.
15. Microsoft Defender PowerShell Commands
Update-MpSignature
Use: Update Microsoft Defender security intelligence.
Quick Scan
Use: Start a Microsoft Defender Quick Scan.
Full Scan
Use: Start a Microsoft Defender Full Scan.
Offline Scan
Use: Start Microsoft Defender Offline Scan.
Get-MpComputerStatus
Use: Display Microsoft Defender protection status.
Get-MpThreat
Use: Review threat information known to Microsoft Defender.
Get-MpThreatDetection
Use: Review Microsoft Defender threat-detection history.
Get-MpPreference
Use: Display Microsoft Defender preferences.
For the complete UniTech LK Defender tutorial:
Microsoft Defender PowerShell Guide16. PowerShell Remote Administration Commands
Test-WSMan
Use: Test whether the WS-Management service is responding.
Enter-PSSession
Use: Start an interactive PowerShell remote session when remoting is configured.
Exit-PSSession
Use: Leave an interactive remote PowerShell session.
Invoke-Command
Use: Run PowerShell commands on a remote computer when remoting is configured.
New-PSSession
Use: Create a persistent remote PowerShell session.
Remove-PSSession
Use: Close a persistent PowerShell session.
17. Useful PowerShell Utility Commands
Clear-Host
Use: Clear the PowerShell console display.
Read-Host
Use: Prompt the user for input.
Write-Host
Use: Write information directly to the host display.
Write-Output
Use: Send objects or values into the PowerShell output pipeline.
Get-History
Use: Display commands from the current PowerShell session history.
Clear-History
Use: Clear the in-session PowerShell command history list.
Start-Transcript
Use: Record a PowerShell session to a text transcript.
Stop-Transcript
Use: Stop recording the current PowerShell transcript.
Get-Clipboard
Use: Read supported clipboard content.
Set-Clipboard
Use: Put text or supported content on the clipboard.
Common PowerShell Commands People Search For
- PowerShell commands
- PowerShell commands list
- PowerShell commands A-Z
- PowerShell administrator commands
- Windows 11 PowerShell commands
- Windows 10 PowerShell commands
- Windows Server PowerShell commands
- PowerShell network commands
- PowerShell DNS commands
- PowerShell storage commands
- PowerShell disk commands
- PowerShell file commands
- PowerShell folder commands
- PowerShell process commands
- PowerShell service commands
- PowerShell security commands
- PowerShell malware scan commands
- Microsoft Defender PowerShell commands
- PowerShell user commands
- PowerShell registry commands
- PowerShell event log commands
- PowerShell TCP connection commands
- PowerShell ping command
- PowerShell port test
- PowerShell IP address command
- PowerShell computer information
- PowerShell serial number command
- PowerShell find large files
- PowerShell C drive analysis
- PowerShell troubleshooting commands
PowerShell Commands Frequently Asked Questions
How do I find a PowerShell command?
Use Get-Command to list available commands. You can also use wildcards to search for a command by keyword.
How do I learn what a PowerShell command does?
Use Get-Help followed by the command name. Add -Examples to see usage examples where help content is available.
Do PowerShell commands work on Windows 11?
Many PowerShell commands work on Windows 11, but availability depends on the PowerShell edition, Windows version and installed modules.
Can PowerShell troubleshoot network problems?
Yes. Commands such as Test-Connection, Test-NetConnection, Get-NetAdapter, Get-NetIPAddress, Get-NetIPConfiguration and Resolve-DnsName can help investigate Windows network problems.
Can PowerShell scan for malware?
On supported Windows systems, Microsoft Defender exposes PowerShell commands for updating security intelligence, starting scans and reviewing protection information.
Should I run every PowerShell command as Administrator?
No. Use elevation only when the operation requires administrative privileges. Information-gathering commands often do not require it.