How to Use PowerShell for Common IT Tasks
Windows troubleshooting
PowerShell
scripting
IT admin
automation
By Kerry · Updated 03/05/26 07:51 AM
PowerShell is Windows' command-line shell and scripting language, essential for IT automation. Open it by right-clicking Start > Windows PowerShell (Admin) for elevated access. Basic navigation: Get-Location (current directory), Set-Location C:\Path (change directory), Get-ChildItem (list files — alias: ls or dir), Get-Content file.txt (view file contents).
Useful IT commands: Get-Service (list all services), Stop-Service -Name 'spooler' (stop a service), Get-Process (list running processes), Restart-Computer (reboot), Get-EventLog -LogName System -Newest 50 (last 50 System events), Test-Connection google.com (ping), Get-NetIPConfiguration (network adapter info).
For Microsoft 365 management: install the Microsoft Graph PowerShell module (Install-Module Microsoft.Graph) to manage users, licenses, and groups from the command line. PowerShell scripts (.ps1 files) automate repetitive tasks — run them from an elevated prompt. Set execution policy to allow local scripts: Set-ExecutionPolicy RemoteSigned. Always test scripts on one system before running across the environment.