100+ Most Useful PowerShell Commands For Windows Users To Boost Productivity 

PowerShell is a powerful command-line and scripting environment built into Windows. With it, you can manage your system, automate tasks, troubleshoot issues, and optimize workflows. This guide lists 100+ essential commands**, covering System, Files, Networking, and Process management. it’s a built-in tool every Windows user can leverage to automate tasks, troubleshoot problems, and boost productivity.
PowerShell doesn’t stop at basic file and system management. Its real power lies in security tasks, automation, and advanced administration.
Use these as your go-to reference for everyday operations.
Safety Reminder
Before executing scripts, review and verify them carefully. Malicious code can cause damage. Always use Microsoft Docs to double-check syntax and behavior.
System Management
1. Restart-Computer – Restart the PC.
Restart-Computer -Force
2. Stop-Computer – Shut down the PC.
Stop-Computer -Force
3. Get-ComputerInfo – Detailed system info.
Get-ComputerInfo | Select-Object CsName, WindowsVersion, OsArchitecture
4. Get-Date – Display/format date & time.
Get-Date -Format "dddd, MMMM dd yyyy HH:mm"
5. Set-Date – Change system time.
Set-Date -Date "09/05/2025 14:30"
6. Get-EventLog – View system logs.
Get-EventLog -LogName System -Newest 20
7. Clear-EventLog – Delete log entries.
Clear-EventLog -LogName Application
8. Get-HotFix – List installed updates.
Get-HotFix | Sort-Object InstalledOn -Descending
9. Get-ExecutionPolicy – Show script policy.
Get-ExecutionPolicy
10. Set-ExecutionPolicy – Change script policy.
Set-ExecutionPolicy RemoteSigned
Files & Folders
11. Get-ChildItem (alias dir, ls) – List files/folders.
Get-ChildItem C:\Users -Recurse
12. Copy-Item – Copy files/folders.
Copy-Item file.txt C:\Backup\
13. Move-Item – Move/rename files.
Move-Item file.txt D:\Archive\file_old.txt
14. Remove-Item – Delete files/folders.
Remove-Item file.txt -Force
15. New-Item – Create new files/folders.
New-Item -Path "C:\Test\report.txt" -ItemType File
16. Get-Content – Show file contents.
Get-Content notes.txt | Select-String "error"
17. Set-Content – Overwrite file contents.
Set-Content notes.txt "Hello PowerShell!"
18. Add-Content – Append to a file.
Add-Content notes.txt "Appended line"
19. Rename-Item – Rename a file/folder.
Rename-Item old.txt new.txt
20. Get-ItemProperty – Get file attributes.
Get-ItemProperty C:\Test\report.txt
Networking
21. Get-NetIPConfiguration – Network settings.
Get-NetIPConfiguration
22. Test-Connection – Ping replacement.
Test-Connection google.com -Count 5
23. Get-NetAdapter – List adapters.
Get-NetAdapter | Format-Table Name, Status, MacAddress
24. Get-NetRoute – Show routing table.
Get-NetRoute
25. Get-DnsClientCache – Cached DNS records.
Get-DnsClientCache | Select-Object Name, RecordType
26. Clear-DnsClientCache – Flush DNS.
Clear-DnsClientCache
27. Get-NetFirewallRule – Firewall rules.
Get-NetFirewallRule | Where-Object {$_.Enabled -eq "True"}
28. New-NetFirewallRule – Add firewall rule.
New-NetFirewallRule -DisplayName "Block Edge" -Program "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" -Action Block
29. Get-NetTCPConnection – Show TCP connections.
Get-NetTCPConnection | Sort-Object -Property LocalPort
30. Get-NetIPAddress – View assigned IPs.
Get-NetIPAddress
Process & Service Management
31. Get-Process – Running processes.
Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 Name, Id, CPU
32. Stop-Process – Kill processes.
Stop-Process -Name notepad -Force
33. Get-Service – List services.
Get-Service | Where-Object {$_.Status -eq "Running"}
34. Stop-Service – Stop a service.
Stop-Service spooler
35. Start-Service – Start a service.
Start-Service spooler
36. Restart-Service – Restart service.
Restart-Service spooler
37. Get-Job – View background jobs.
Get-Job
38. Start-Job – Run jobs in background.
Start-Job { Get-Process | Where-Object CPU }
39. Receive-Job – Retrieve job output.
Receive-Job -Id 1
40. Remove-Job – Delete jobs.
Remove-Job -Id 1
41. Get-ScheduledTask – List scheduled tasks.
Get-ScheduledTask | Select-Object TaskName, State
42. Register-ScheduledTask – Create scheduled task.
$Action = New-ScheduledTaskAction -Execute "notepad.exe"
$Trigger = New-ScheduledTaskTrigger -At 3pm -Daily
Register-ScheduledTask -Action $Action -Trigger $Trigger -TaskName "Open Notepad"
43. Unregister-ScheduledTask – Delete tasks.
Unregister-ScheduledTask -TaskName "Open Notepad" -Confirm:$false
44. Get-Clipboard – Read clipboard text.
Get-Clipboard
45. Set-Clipboard – Write text to clipboard.
"Hello PowerShell" | Set-Clipboard
46. Measure-Object – Measure data (count, sum).
Get-ChildItem C:\Windows | Measure-Object
47. Compare-Object – Compare two data sets.
Compare-Object (Get-Content file1.txt) (Get-Content file2.txt)
48. Select-Object – Choose specific fields.
Get-Process | Select-Object Name, Id, CPU
49. Sort-Object – Sort results.
Get-Process | Sort-Object CPU -Descending
50. Group-Object – Group data.
Get-Process | Group-Object ProcessName
Perfect Let’s continue with Part 2 (Commands 51–100+) of the Ultimate 100+ PowerShell Commands Guide.
This section covers User & Security, Productivity, Scripting & Automation, and Advanced Administration — with multi-line examples for pipelines and automation.
User & Security
51. Get-LocalUser – List local accounts.
Get-LocalUser
52. New-LocalUser – Create a new account.
New-LocalUser "TestUser" -Password (Read-Host -AsSecureString "Enter Password")
53. Disable-LocalUser – Disable account.
Disable-LocalUser -Name "TestUser"
54. Enable-LocalUser – Enable account.
Enable-LocalUser -Name "TestUser"
55. Get-LocalGroup – Show groups.
Get-LocalGroup
56. Add-LocalGroupMember – Add user to group.
Add-LocalGroupMember -Group "Administrators" -Member "TestUser"
57. Remove-LocalGroupMember – Remove user.
Remove-LocalGroupMember -Group "Administrators" -Member "TestUser"
58. Get-Acl – View file/folder permissions.
Get-Acl C:\Test | Format-List
59. Set-Acl – Change permissions.
$acl = Get-Acl C:\Test
Set-Acl C:\Test $acl
60. ConvertTo-SecureString – Secure passwords.
"mypassword" | ConvertTo-SecureString -AsPlainText -Force
Productivity & Utilities
61. Get-History – Show past commands.
Get-History
62. Invoke-History – Re-run commands.
Invoke-History 5
63. Clear-History – Wipe history.
Clear-History
64. Out-File – Write output to file.
Get-Process | Out-File processes.txt
65. Export-Csv – Export structured data.
Get-Service | Export-Csv services.csv -NoTypeInformation
66. Import-Csv – Read CSV data.
Import-Csv services.csv | Format-Table
67. ConvertTo-Json – Convert objects to JSON.
Get-Process | Select-Object -First 3 | ConvertTo-Json
68. ConvertFrom-Json – Parse JSON data.
'{ "Name": "TestApp", "Version": "1.0" }' | ConvertFrom-Json
69. Start-Transcript – Record session.
Start-Transcript -Path session.txt
70. Stop-Transcript – End recording.
Stop-Transcript
Scripting & Automation
71. ForEach-Object – Loop through items.
Get-Process | ForEach-Object { "$($_.Name) is using $($_.CPU) CPU" }
72. Where-Object – Filter objects.
Get-Service | Where-Object {$_.Status -eq "Running"}
73. Pipeline Example (Multi-line) – Chain commands.
Get-ChildItem C:\Logs -Recurse |
Where-Object { $_.Extension -eq ".txt" } |
Select-Object FullName, Length |
Sort-Object Length -Descending |
Out-File LargestLogs.txt
74. Try/Catch – Error handling.
Try {
Get-Content missingfile.txt
} Catch {
Write-Output "File not found!"
}
75. Start-Sleep – Pause script.
Start-Sleep -Seconds 10
76. Invoke-Command – Run command remotely.
Invoke-Command -ComputerName Server01 -ScriptBlock { Get-Process }
77. New-PSSession – Create remote session.
New-PSSession -ComputerName Server01
78. Enter-PSSession – Connect to remote system.
Enter-PSSession -ComputerName Server01
79. Exit-PSSession – Leave remote session.
Exit-PSSession
80. Remove-PSSession – Close sessions.
Get-PSSession | Remove-PSSession
Advanced Administration
81. Get-WmiObject – Access system info.
Get-WmiObject Win32_OperatingSystem | Select-Object Caption, OSArchitecture
82. Get-CimInstance – Modern WMI replacement.
Get-CimInstance Win32_Processor | Select-Object Name, NumberOfCores
83. Invoke-WebRequest – Download web content.
Invoke-WebRequest "https://example.com/file.zip" -OutFile "file.zip"
84. Invoke-RestMethod – API calls.
Invoke-RestMethod "https://api.github.com/repos/microsoft/powershell" | Select-Object name, stargazers_count
85. Compress-Archive – Zip files.
Compress-Archive -Path C:\Test\* -DestinationPath C:\Backup\archive.zip
86. Expand-Archive – Extract files.
Expand-Archive -Path archive.zip -DestinationPath C:\Test
87. Get-Disk – List storage devices.
Get-Disk | Format-Table Number, FriendlyName, Size
88. Get-Partition – Show partitions.
Get-Partition
89. Get-Volume – View drives.
Get-Volume | Select-Object DriveLetter, FileSystemLabel, SizeRemaining
90. Format-Volume – Format drive.
Format-Volume -DriveLetter E -FileSystem NTFS -Confirm:$false
91. Mount-DiskImage – Mount ISO/VHD.
Mount-DiskImage -ImagePath "C:\ISO\Windows.iso"
92. Dismount-DiskImage – Unmount ISO/VHD.
Dismount-DiskImage -ImagePath "C:\ISO\Windows.iso"
93. Get-ProcessMitigation – Security protections.
Get-ProcessMitigation -Name notepad.exe
94. Set-ProcessMitigation – Configure protections.
Set-ProcessMitigation -Name notepad.exe -Enable DEP, ASLR
95. Get-WindowsFeature – Installed Windows features.
Get-WindowsFeature | Where-Object {$_.Installed -eq $true}
96. Install-WindowsFeature – Add feature.
Install-WindowsFeature -Name Web-Server
97. Remove-WindowsFeature – Remove feature.
Remove-WindowsFeature -Name Web-Server
98. Get-Module – List modules.
Get-Module -ListAvailable
99. Import-Module – Load module.
Import-Module ActiveDirectory
100. Find-Module – Search PowerShell Gallery.
Find-Module -Name Az
101. Install-Module – Install module.
Install-Module -Name Az -Scope CurrentUser
Final Note
With these 100+ commands, you now have a complete reference for PowerShell:
- Part 1 (1–50): System, Files, Networking, Processes
- Part 2 (51–100+): Security, Productivity, Automation, Advanced Admin
This collection equips you to manage, automate, and optimize Windows like a pro.