List of Windows PowerShell commands for 2025
PowerShell, Microsoft's advanced command shell, remains an essential tool in 2025 for administrators, developers, and Windows 11 users. With updates like PowerShell 7.5 (released in 2024), it supports hybrid environments, AI, and cloud automation (Azure).
This list includes key commands (cmdlets) organized by category, with practical examples and common parameters. For beginners, remember that PowerShell uses Verb-Noun syntax (e.g., Get-Process).
Run in PowerShell 7+ for compatibility with Windows 10 (until October 2025) and 11. Windows 11 Errors and Solutions: Common Problems
Basic commands for file navigation and management
These cmdlets handle directories, files, and simple processes.
| Command | Description | Example |
|---|---|---|
| get-command | List of available commands | Get-Command *process* – Displays cmdlets with "process" |
| Get-ChildItem | List folder contents (alias: ls, dir) | Get-ChildItem -Force – Includes hidden features |
| Set-Location | Change directory (alias: cd) | Set-Location C:\Users – Goes to user folder |
| New-Item | Create file/folder | New-Item -ItemType Directory -Path "Proyectos" – Create folder |
| remove-item | Delete file/folder (alias: del) | Remove-Item archivo.txt -Force – Delete with confirmation |
object lesson: Get-ChildItem -Path C:\ -Recurse -Filter *.txt List all .txt files in C:\ recursively.
Management of processes and services
Useful for monitoring and controlling running apps.
| Command | Description | Example |
|---|---|---|
| Get-Process | List active processes (alias: ps) | Get-Process chrome – Shows Chrome processes |
| stop-process | Stops process | Stop-Process -Name notepad -Force – Close Notepad |
| Get Service | List of services | Get-Service | Where-Object Status -eq "Running" – Active services |
| start-service | Start service | Start-Service Spooler – Start printer |
| stop service | Service is suspended | Stop-Service Spooler – For printer |
object lesson: Get-Process | Sort-Object CPU -Descending | Select-Object -First 5 Shows the 5 processes with the most CPU.
Commands for network and connectivity
Essential for diagnosing and configuring networks.
| Command | Description | Example |
|---|---|---|
| Test-NetConnection | Test connection (alias: tnc) | Test-NetConnection google.com -Port 80 – Ping to port |
| Get-NetAdapter | List of network adapters | Get-NetAdapter | Where-Object Status -eq "Up" – Active networks |
| Restart-NetAdapter | Restart adapter | Restart-NetAdapter -Name "Wi-Fi" – Restart Wi-Fi |
| Get-DnsClientServerAddress | DNS configuration | Get-DnsClientServerAddress -AddressFamily IPv4 – DNS IPv4 |
| Set-DnsClientServerAddress | Change DNS | Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses "8.8.8.8" – Google DNS |
object lesson: Test-NetConnection 192.168.1.1 -Port 80 Check if the router is responding.
Automation and scripting
PowerShell shines in scripting for repetitive tasks.
| Command | Description | Example |
|---|---|---|
| Invoke-WebRequest | Download web content (alias: iwr) | Invoke-WebRequest -Uri "https://ejemplo.com" -OutFile "pagina.html" – Save page |
| Export-Csv | Export data to CSV | Get-Process | Export-Csv procesos.csv – List of processes in CSV format |
| Import-Csv | Import CSV | Import-Csv procesos.csv | Select-Object Name, CPU – Read and filter |
| ForEach-Object | Loop through objects (alias: % ) | Get-Process | ForEach-Object { $_.Name } – Process names |
| Write-Host | Display output | Write-Host "Hola, mundo!" – Console message |
object lesson: Get-Service | Where-Object Status -eq "Stopped" | Export-Csv servicios.csv generates a CSV file of stopped services.
User management and security
For administrators, commands for accounts and permissions.
| Command | Description | Example |
|---|---|---|
| New-LocalUser | Create local user | New-LocalUser -Name "Juan" -Password (ConvertTo-SecureString "P@ssw0rd" -AsPlainText -Force) |
| get-localuser | User list | Get-LocalUser – All local users |
| Disable-LocalUser | Disable user | Disable-LocalUser -Name "Juan" |
| Get-LocalGroup | List of groups | Get-LocalGroup – Local groups |
| Add-LocalGroupMember | Add to group | Add-LocalGroupMember -Group "Administradores" -Member "Juan" |
object lesson: New-LocalUser -Name "Estudiante" -Password (ConvertTo-SecureString "123456" -AsPlainText -Force) create a test user.
Commands for Azure and cloud (PowerShell 7+)
In 2025, PowerShell will integrate with Azure for cloud management.
| Command | Description | Example |
|---|---|---|
| Connect-AzAccount | Connect to Azure | Connect-AzAccount - Log in |
| Get-AzVM | List VMs in Azure | Get-AzVM – Show virtual machines |
| New-AzVM | Create VM | New-AzVM -ResourceGroupName "Grupo1" -Name "VM1" |
| Stop-AzVM | VM stops | Stop-AzVM -ResourceGroupName "Grupo1" -Name "VM1" |
object lesson: Connect-AzAccount followed by Get-AzVM List of VMs for monitoring.
Tips for using PowerShell in 2025
- Run as administrator: For sensitive commands (Windows + X > Terminal (Admin)).
- Use alias:
dirinstead ofGet-ChildItemfor speed. - Learn piping:
Get-Process | Stop-Process -Name notepadstops processes. - ScriptsSave commands in .ps1 and run them with
.\script.ps1. - Update PowerShellDownload PowerShell 7.5 from github.com/PowerShell/PowerShell for Azure.
ExampleCreate a script to list processes: Get-Process | Export-Csv procesos.csv.
Common troubleshooting
| Problem | Cause | A satisfactory solution |
|---|---|---|
| Unrecognized command | Module not loaded | Import-Module ActiveDirectory |
| Permissions error | Not an administrator | Run as admin |
| Script blocked | Implementation policy | Set-ExecutionPolicy RemoteSigned |
| Azure is not connecting | Invalid credentials | Connect-AzAccount with MFA |
Example: Yes Get-AzVM fails, executes Connect-AzAccount to authenticate.
Conclusion
PowerShell By 2025, it will be essential for Windows 11, with commands like Get-Command, Get-ChildItem, Get-Process, and New-LocalUser for daily management. Master aliases, piping, and modules for automation. Upgrade to PowerShell 7.5 for Azure and migrate from Windows 10 before October 2025 for compatibility. Practice in a test environment for efficiency.
FAQs
- Is PowerShell safe?
Yes, with execution policies (Set-ExecutionPolicy). - How to learn more?
Use Get-Help command (e.g. Get-Help Get-Process). - Does it work on Windows 10?
Yes, until October 2025. - Which Azure module?
Az.Accounts; install with Install-Module Az.