100 Essential PowerShell Commands for Windows 10 & 11 (2025 Edition)

π₯οΈ System Information & Performance
- Get-ComputerInfo β Displays detailed system information.
- Get-Process β Lists all running processes.
- Get-Service β Shows all services and their current status.
- Get-WmiObject win32_bios β Returns BIOS version and related info.
- Get-WmiObject Win32_ComputerSystem β Displays system model, manufacturer, and domain.
- Get-CimInstance -ClassName Win32_OperatingSystem β Shows OS version and build info.
- Get-HotFix β Lists installed Windows updates.
- systeminfo β Displays full system details including install date, RAM, and domain.
- Get-EventLog -LogName System -Newest 50 β Shows the 50 most recent system event logs.
- Get-ItemProperty “HKLM:\Software\Microsoft\Windows NT\CurrentVersion” β Displays Windows version from the registry.
- Get-Host β Displays information about the PowerShell host environment.
- Get-Uptime β Shows how long the system has been running.
- Get-EventLog -List β Lists all available event logs.
- Clear-EventLog -LogName Application β Clears the Application event log.
- Get-PSDrive β Lists logical drives, including registry and environment.
- Get-Location β Displays the current working directory.
- Measure-Command { Get-Process } β Measures how long a command takes to run.
- Get-History β Displays session command history.
- Clear-History β Clears command history from the current session.
- Get-LogProperties β Displays log configuration properties for a source.
π User & Security Management
- Get-LocalUser β Lists all local user accounts.
- New-LocalUser -Name “testuser” -Password (Read-Host -AsSecureString) β Creates a new local user.
- Add-LocalGroupMember -Group “Administrators” -Member “testuser” β Adds a user to the Administrators group.
- Remove-LocalUser -Name “testuser” β Deletes the specified user.
- Set-LocalUser -Name “testuser” -PasswordNeverExpires $true β Prevents the userβs password from expiring.
- Get-LocalGroup β Lists all local groups on the machine.
- Get-LocalGroupMember -Group “Administrators” β Lists members of the Administrators group.
- Enable-LocalUser -Name “Guest” β Enables the Guest account.
- Disable-LocalUser -Name “Guest” β Disables the Guest account.
- net user β Lists all users on the system using classic CMD.
π¦ Software & Applications
- Get-Package β Lists all installed software packages.
- Get-AppxPackage β Lists installed Microsoft Store apps.
- Get-AppxPackage -AllUsers β Lists apps for all user profiles.
- Remove-AppxPackage -Package “Microsoft.YourPhone” β Removes the Your Phone app.
- Install-PackageProvider -Name NuGet -Force β Installs NuGet for module management.
- Get-WmiObject -Class Win32_Product β Lists all installed applications (slow but detailed).
- winget list β Lists all installed software using Winget.
- winget install firefox β Installs Firefox via Windows Package Manager.
- Get-PackageSource β Lists registered software repositories.
- Update-Module β Updates all installed PowerShell modules.
π File & Folder Management
- Get-ChildItem β Lists files and folders in the current directory.
- Get-ChildItem -Recurse β Lists all files and folders recursively.
- Copy-Item -Path “C:\Source” -Destination “D:\Backup” -Recurse β Copies folders recursively.
- Move-Item -Path “file.txt” -Destination “C:\NewFolder” β Moves a file.
- Remove-Item -Path “C:\Temp\oldfile.txt” β Deletes a file.
- New-Item -ItemType Directory -Path “C:\Reports” β Creates a new folder.
- Get-Content C:\file.txt β Displays contents of a file.
- Set-Content C:\file.txt “Hello World” β Replaces file content with new text.
- Add-Content C:\file.txt “New Line” β Appends text to a file.
- Get-FileHash C:\file.txt β Generates a hash of a file.
π Networking
- Test-Connection google.com β Pings a host and displays response time.
- Resolve-DnsName example.com β Resolves a domain name to IP.
- Get-NetIPAddress β Shows all configured IP addresses.
- Get-NetAdapter β Lists all network adapters.
- Get-NetTCPConnection β Displays active TCP connections.
- Get-NetFirewallProfile β Shows firewall status for domain/private/public.
- Get-NetRoute β Displays the routing table.
- Get-NetIPConfiguration β Displays full IP config.
- Set-DnsClientServerAddress -InterfaceAlias “Ethernet” -ServerAddresses “8.8.8.8”,”1.1.1.1″ β Sets DNS servers.
- ipconfig /all β Displays full network configuration (legacy).
π Tasks & Services
- Get-ScheduledTask β Lists all scheduled tasks.
- Register-ScheduledTask β Creates a new scheduled task.
- Unregister-ScheduledTask β Deletes a scheduled task.
- Start-ScheduledTask -TaskName “Cleanup” β Manually runs a scheduled task.
- Get-Service bits β Displays the status of the BITS service.
- Start-Service wuauserv β Starts the Windows Update service.
- Stop-Service wuauserv β Stops the Windows Update service.
- Restart-Service spooler β Restarts the Print Spooler service.
- Set-Service -Name bits -StartupType Manual β Changes the service startup type.
- sc query β Shows service status using classic command-line.
π§° Clipboard, Registry & Utilities
- Get-Clipboard β Retrieves clipboard contents.
- Set-Clipboard -Value “Copied text” β Sets clipboard contents.
- New-Item -Path “HKCU:\Software\Test” -Force β Creates a registry key.
- Remove-Item -Path “HKCU:\Software\Test” -Recurse β Deletes a registry key.
- Get-ItemProperty -Path “HKCU:\Software\Test” β Displays registry key properties.
- Set-ItemProperty -Path “HKCU:\Software\Test” -Name “Setting” -Value “123” β Sets a registry value.
- Get-Variable β Lists all PowerShell variables in the session.
- Clear-Variable -Name “varName” β Clears the specified variable.
- Get-Alias β Lists all aliases for PowerShell commands.
- New-Alias -Name list -Value Get-ChildItem β Creates a command shortcut.
π Automation, Scripting & Loops
- For ($i = 1; $i -le 5; $i++) { Write-Output “Line $i” } β Loops and prints 5 lines.
- $files = Get-ChildItem C:\Logs β Stores files in a variable.
- foreach ($file in $files) { Write-Output $file.Name } β Loops through a file list.
- if (Test-Path C:\temp.txt) { Remove-Item C:\temp.txt } β Deletes a file if it exists.
- Try { Get-Item C:\missing.txt } Catch { Write-Output “Error!” } β Try/catch for errors.
- Start-Sleep -Seconds 5 β Pauses the script for 5 seconds.
- Read-Host “Enter your name” β Prompts user input.
- Write-Output “Hello, world” β Outputs text to the console.
- Out-File -FilePath C:\log.txt β Saves output to a text file.
- Get-Command β Lists all available commands in PowerShell.
π§ͺ Troubleshooting & Diagnostics
- Get-WindowsUpdateLog β Collects and converts the Windows Update log.
- sfc /scannow β Scans for and repairs corrupted system files.
- DISM /Online /Cleanup-Image /RestoreHealth β Repairs Windows image files.
- Get-EventLog -LogName Application -Newest 20 β Shows the latest application logs.
- Get-EventLog -LogName Security -EntryType FailureAudit β Filters failed login attempts.
- ping 8.8.8.8 β Tests basic internet connectivity.
- tracert google.com β Traces the path to a host.
- Get-Content “C:\Windows\Logs\CBS\CBS.log” -Tail 50 β Shows the latest lines from the CBS log.
- Get-WindowsErrorReporting β Displays Windows error reporting configuration.
- Get-Disk β Lists all connected disks and partitions.
Conclusion:
This list of 100 PowerShell commands will help you navigate the Windows operating system like a pro. From managing users to automating tasks and digging into diagnostics, these commands are essential for anyone serious about mastering Windows with PowerShell.