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

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

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.


:high_voltage: 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.


:small_blue_diamond: System Management

1. Restart-Computer – Restart the PC.

Restart-Computer -Force

:link: Docs

2. Stop-Computer – Shut down the PC.

Stop-Computer -Force

:link: Docs

3. Get-ComputerInfo – Detailed system info.

Get-ComputerInfo | Select-Object CsName, WindowsVersion, OsArchitecture

:link: Docs

4. Get-Date – Display/format date & time.

Get-Date -Format "dddd, MMMM dd yyyy HH:mm"

:link: Docs

5. Set-Date – Change system time.

Set-Date -Date "09/05/2025 14:30"

:link: Docs

6. Get-EventLog – View system logs.

Get-EventLog -LogName System -Newest 20

:link: Docs

7. Clear-EventLog – Delete log entries.

Clear-EventLog -LogName Application

:link: Docs

8. Get-HotFix – List installed updates.

Get-HotFix | Sort-Object InstalledOn -Descending

:link: Docs

9. Get-ExecutionPolicy – Show script policy.

Get-ExecutionPolicy

:link: Docs

10. Set-ExecutionPolicy – Change script policy.

Set-ExecutionPolicy RemoteSigned

:link: Docs


:small_blue_diamond: Files & Folders

11. Get-ChildItem (alias dir, ls) – List files/folders.

Get-ChildItem C:\Users -Recurse

:link: Docs

12. Copy-Item – Copy files/folders.

Copy-Item file.txt C:\Backup\

:link: Docs

13. Move-Item – Move/rename files.

Move-Item file.txt D:\Archive\file_old.txt

:link: Docs

14. Remove-Item – Delete files/folders.

Remove-Item file.txt -Force

:link: Docs

15. New-Item – Create new files/folders.

New-Item -Path "C:\Test\report.txt" -ItemType File

:link: Docs

16. Get-Content – Show file contents.

Get-Content notes.txt | Select-String "error"

:link: Docs

17. Set-Content – Overwrite file contents.

Set-Content notes.txt "Hello PowerShell!"

:link: Docs

18. Add-Content – Append to a file.

Add-Content notes.txt "Appended line"

:link: Docs

19. Rename-Item – Rename a file/folder.

Rename-Item old.txt new.txt

:link: Docs

20. Get-ItemProperty – Get file attributes.

Get-ItemProperty C:\Test\report.txt

:link: Docs


:small_blue_diamond: Networking

21. Get-NetIPConfiguration – Network settings.

Get-NetIPConfiguration

:link: Docs

22. Test-Connection – Ping replacement.

Test-Connection google.com -Count 5

:link: Docs

23. Get-NetAdapter – List adapters.

Get-NetAdapter | Format-Table Name, Status, MacAddress

:link: Docs

24. Get-NetRoute – Show routing table.

Get-NetRoute

:link: Docs

25. Get-DnsClientCache – Cached DNS records.

Get-DnsClientCache | Select-Object Name, RecordType

:link: Docs

26. Clear-DnsClientCache – Flush DNS.

Clear-DnsClientCache

:link: Docs

27. Get-NetFirewallRule – Firewall rules.

Get-NetFirewallRule | Where-Object {$_.Enabled -eq "True"}

:link: Docs

28. New-NetFirewallRule – Add firewall rule.

New-NetFirewallRule -DisplayName "Block Edge" -Program "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" -Action Block

:link: Docs

29. Get-NetTCPConnection – Show TCP connections.

Get-NetTCPConnection | Sort-Object -Property LocalPort

:link: Docs

30. Get-NetIPAddress – View assigned IPs.

Get-NetIPAddress

:link: Docs


:small_blue_diamond: Process & Service Management

31. Get-Process – Running processes.

Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 Name, Id, CPU

:link: Docs

32. Stop-Process – Kill processes.

Stop-Process -Name notepad -Force

:link: Docs

33. Get-Service – List services.

Get-Service | Where-Object {$_.Status -eq "Running"}

:link: Docs

34. Stop-Service – Stop a service.

Stop-Service spooler

:link: Docs

35. Start-Service – Start a service.

Start-Service spooler

:link: Docs

36. Restart-Service – Restart service.

Restart-Service spooler

:link: Docs

37. Get-Job – View background jobs.

Get-Job

:link: Docs

38. Start-Job – Run jobs in background.

Start-Job { Get-Process | Where-Object CPU }

:link: Docs

39. Receive-Job – Retrieve job output.

Receive-Job -Id 1

:link: Docs

40. Remove-Job – Delete jobs.

Remove-Job -Id 1

:link: Docs

41. Get-ScheduledTask – List scheduled tasks.

Get-ScheduledTask | Select-Object TaskName, State

:link: Docs

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"

:link: Docs

43. Unregister-ScheduledTask – Delete tasks.

Unregister-ScheduledTask -TaskName "Open Notepad" -Confirm:$false

:link: Docs

44. Get-Clipboard – Read clipboard text.

Get-Clipboard

:link: Docs

45. Set-Clipboard – Write text to clipboard.

"Hello PowerShell" | Set-Clipboard

:link: Docs

46. Measure-Object – Measure data (count, sum).

Get-ChildItem C:\Windows | Measure-Object

:link: Docs

47. Compare-Object – Compare two data sets.

Compare-Object (Get-Content file1.txt) (Get-Content file2.txt)

:link: Docs

48. Select-Object – Choose specific fields.

Get-Process | Select-Object Name, Id, CPU

:link: Docs

49. Sort-Object – Sort results.

Get-Process | Sort-Object CPU -Descending

:link: Docs

50. Group-Object – Group data.

Get-Process | Group-Object ProcessName

:link: Docs


Perfect :white_check_mark: 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.


:small_blue_diamond: User & Security

51. Get-LocalUser – List local accounts.

Get-LocalUser

:link: Docs

52. New-LocalUser – Create a new account.

New-LocalUser "TestUser" -Password (Read-Host -AsSecureString "Enter Password")

:link: Docs

53. Disable-LocalUser – Disable account.

Disable-LocalUser -Name "TestUser"

:link: Docs

54. Enable-LocalUser – Enable account.

Enable-LocalUser -Name "TestUser"

:link: Docs

55. Get-LocalGroup – Show groups.

Get-LocalGroup

:link: Docs

56. Add-LocalGroupMember – Add user to group.

Add-LocalGroupMember -Group "Administrators" -Member "TestUser"

:link: Docs

57. Remove-LocalGroupMember – Remove user.

Remove-LocalGroupMember -Group "Administrators" -Member "TestUser"

:link: Docs

58. Get-Acl – View file/folder permissions.

Get-Acl C:\Test | Format-List

:link: Docs

59. Set-Acl – Change permissions.

$acl = Get-Acl C:\Test
Set-Acl C:\Test $acl

:link: Docs

60. ConvertTo-SecureString – Secure passwords.

"mypassword" | ConvertTo-SecureString -AsPlainText -Force

:link: Docs


:small_blue_diamond: Productivity & Utilities

61. Get-History – Show past commands.

Get-History

:link: Docs

62. Invoke-History – Re-run commands.

Invoke-History 5

:link: Docs

63. Clear-History – Wipe history.

Clear-History

:link: Docs

64. Out-File – Write output to file.

Get-Process | Out-File processes.txt

:link: Docs

65. Export-Csv – Export structured data.

Get-Service | Export-Csv services.csv -NoTypeInformation

:link: Docs

66. Import-Csv – Read CSV data.

Import-Csv services.csv | Format-Table

:link: Docs

67. ConvertTo-Json – Convert objects to JSON.

Get-Process | Select-Object -First 3 | ConvertTo-Json

:link: Docs

68. ConvertFrom-Json – Parse JSON data.

'{ "Name": "TestApp", "Version": "1.0" }' | ConvertFrom-Json

:link: Docs

69. Start-Transcript – Record session.

Start-Transcript -Path session.txt

:link: Docs

70. Stop-Transcript – End recording.

Stop-Transcript

:link: Docs


:small_blue_diamond: Scripting & Automation

71. ForEach-Object – Loop through items.

Get-Process | ForEach-Object { "$($_.Name) is using $($_.CPU) CPU" }

:link: Docs

72. Where-Object – Filter objects.

Get-Service | Where-Object {$_.Status -eq "Running"}

:link: Docs

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

:link: Docs

74. Try/Catch – Error handling.

Try {
    Get-Content missingfile.txt
} Catch {
    Write-Output "File not found!"
}

:link: Docs

75. Start-Sleep – Pause script.

Start-Sleep -Seconds 10

:link: Docs

76. Invoke-Command – Run command remotely.

Invoke-Command -ComputerName Server01 -ScriptBlock { Get-Process }

:link: Docs

77. New-PSSession – Create remote session.

New-PSSession -ComputerName Server01

:link: Docs

78. Enter-PSSession – Connect to remote system.

Enter-PSSession -ComputerName Server01

:link: Docs

79. Exit-PSSession – Leave remote session.

Exit-PSSession

:link: Docs

80. Remove-PSSession – Close sessions.

Get-PSSession | Remove-PSSession

:link: Docs


:small_blue_diamond: Advanced Administration

81. Get-WmiObject – Access system info.

Get-WmiObject Win32_OperatingSystem | Select-Object Caption, OSArchitecture

:link: Docs

82. Get-CimInstance – Modern WMI replacement.

Get-CimInstance Win32_Processor | Select-Object Name, NumberOfCores

:link: Docs

83. Invoke-WebRequest – Download web content.

Invoke-WebRequest "https://example.com/file.zip" -OutFile "file.zip"

:link: Docs

84. Invoke-RestMethod – API calls.

Invoke-RestMethod "https://api.github.com/repos/microsoft/powershell" | Select-Object name, stargazers_count

:link: Docs

85. Compress-Archive – Zip files.

Compress-Archive -Path C:\Test\* -DestinationPath C:\Backup\archive.zip

:link: Docs

86. Expand-Archive – Extract files.

Expand-Archive -Path archive.zip -DestinationPath C:\Test

:link: Docs

87. Get-Disk – List storage devices.

Get-Disk | Format-Table Number, FriendlyName, Size

:link: Docs

88. Get-Partition – Show partitions.

Get-Partition

:link: Docs

89. Get-Volume – View drives.

Get-Volume | Select-Object DriveLetter, FileSystemLabel, SizeRemaining

:link: Docs

90. Format-Volume – Format drive.

Format-Volume -DriveLetter E -FileSystem NTFS -Confirm:$false

:link: Docs

91. Mount-DiskImage – Mount ISO/VHD.

Mount-DiskImage -ImagePath "C:\ISO\Windows.iso"

:link: Docs

92. Dismount-DiskImage – Unmount ISO/VHD.

Dismount-DiskImage -ImagePath "C:\ISO\Windows.iso"

:link: Docs

93. Get-ProcessMitigation – Security protections.

Get-ProcessMitigation -Name notepad.exe

:link: Docs

94. Set-ProcessMitigation – Configure protections.

Set-ProcessMitigation -Name notepad.exe -Enable DEP, ASLR

:link: Docs

95. Get-WindowsFeature – Installed Windows features.

Get-WindowsFeature | Where-Object {$_.Installed -eq $true}

:link: Docs

96. Install-WindowsFeature – Add feature.

Install-WindowsFeature -Name Web-Server

:link: Docs

97. Remove-WindowsFeature – Remove feature.

Remove-WindowsFeature -Name Web-Server

:link: Docs

98. Get-Module – List modules.

Get-Module -ListAvailable

:link: Docs

99. Import-Module – Load module.

Import-Module ActiveDirectory

:link: Docs

100. Find-Module – Search PowerShell Gallery.

Find-Module -Name Az

:link: Docs

101. Install-Module – Install module.

Install-Module -Name Az -Scope CurrentUser

:link: Docs


:rocket: 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.

ENJOY & HAPPY LEARNING! :heart:

17 Likes

Thanks for these compilation :+1:

3 Likes

Thanks for these compilations. Very helpful and useful.

2 Likes

ur grat sammmmmmmmmmmmmmm

2 Likes

Thanks for this @SaM

2 Likes

Great. thank you

2 Likes