PowerShell for Everyday Windows Tasks: A Practical Guide for Users and Businesses
PowerShell may look intimidating at first, especially if you are used to navigating Windows with menus, icons and control panels. However, it is one of the most useful tools built into Windows for completing repetitive tasks, checking system information and troubleshooting common problems.
You do not need to be a developer or systems administrator to benefit from it. With a few basic commands, PowerShell can help you find large files, check network settings, view running processes, manage services and automate everyday Windows tasks.
This guide explains what PowerShell is, how it works and which commands are genuinely useful for day-to-day Windows management.
What Is PowerShell?
PowerShell is a command-line and automation tool developed by Microsoft.
It allows users to control Windows by typing commands instead of clicking through menus. It can also combine multiple commands into scripts, making it possible to automate tasks that would otherwise take a long time to complete manually.
PowerShell is commonly used by:
- IT support teams
- System administrators
- Cybersecurity professionals
- Software developers
- Advanced Windows users
- Businesses managing multiple computers
Unlike the traditional Command Prompt, PowerShell works with structured objects rather than plain text. This makes it much more powerful when searching, filtering and managing information.
PowerShell vs Command Prompt
Command Prompt and PowerShell may look similar, but they are designed for different purposes.
Command Prompt is mainly used for older Windows commands such as:
ipconfig
ping
dir
PowerShell can run many of those commands, but it also supports modern commands known as cmdlets.
Examples include:
Get-Process
Get-Service
Get-ChildItem
PowerShell is generally better for automation, administration and advanced troubleshooting.
How to Open PowerShell
There are several ways to open PowerShell in Windows 11.
The easiest method is to right-click the Start button and choose:
Terminal
Windows Terminal normally opens PowerShell by default.
You can also search for:
PowerShell
Some commands require administrator privileges. In those cases, right-click Windows Terminal or PowerShell and choose:
Run as administrator
Only use administrator mode when it is genuinely required. Commands run with elevated permissions can make significant changes to the computer.
Understanding PowerShell Cmdlets
Most PowerShell commands follow a simple naming structure:
Verb-Noun
For example:
Get-Process
The verb describes the action, while the noun describes the item being managed.
Common PowerShell verbs include:
- Get — retrieve information
- Set — change a setting
- Start — start something
- Stop — stop something
- Restart — restart something
- Test — check whether something works
- Remove — delete something
- Export — save information to a file
This naming system makes PowerShell commands easier to understand once you recognise the pattern.
1. Check Your PowerShell Version
To see which version of PowerShell is installed, run:
$PSVersionTable
This displays information including the PowerShell version, Windows edition and supported platform.
This is useful because some commands and features are only available in newer versions.
2. Find Basic Computer Information
PowerShell can quickly display important information about your Windows computer.
Run:
Get-ComputerInfo
This may show:
- Windows version
- Computer manufacturer
- BIOS details
- Processor information
- Installed memory
- System type
- Last boot time
The output can be extensive, so you can request specific details instead:
Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion, CsManufacturer, CsModel
This produces a cleaner summary.
3. Check How Long the Computer Has Been Running
Long uptimes can sometimes contribute to performance issues, particularly if Windows updates or software changes are waiting for a restart.
Run:
(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime
This shows how much time has passed since the computer last started.
You can also view the exact boot time:
(Get-CimInstance Win32_OperatingSystem).LastBootUpTime
4. View Running Processes
To view all running processes, use:
Get-Process
This is similar to opening Task Manager.
To sort processes by memory usage:
Get-Process | Sort-Object WorkingSet -Descending
To show the ten processes using the most memory:
Get-Process |
Sort-Object WorkingSet -Descending |
Select-Object -First 10 Name, Id, CPU, WorkingSet
This can help identify applications consuming excessive system resources.
5. Stop a Frozen Application
A frozen program can sometimes be closed through PowerShell.
First, find the process:
Get-Process
Then stop it by name:
Stop-Process -Name notepad
Replace notepad with the correct process name.
To force the process to close:
Stop-Process -Name notepad -Force
Use the -Force option carefully, as unsaved work may be lost.
6. Check Windows Services
Windows services run in the background and support features such as printing, updates, networking and security.
To view all services:
Get-Service
To view only running services:
Get-Service | Where-Object Status -eq "Running"
To find a specific service:
Get-Service -Name Spooler
The Print Spooler service, for example, controls print jobs.
7. Restart a Windows Service
Restarting a service can resolve certain issues without rebooting the entire computer.
For example, to restart the Print Spooler:
Restart-Service -Name Spooler
This normally requires PowerShell to be opened as an administrator.
You can also stop and start it separately:
Stop-Service -Name Spooler
Start-Service -Name Spooler
Avoid restarting services unless you understand what they do. Stopping an important service can interrupt network access, security software or business applications.
8. Check Your IP Address
To display network adapter information, run:
Get-NetIPConfiguration
This shows useful details such as:
- IP address
- Default gateway
- DNS servers
- Network adapter name
- Connection status
To display only IPv4 addresses:
Get-NetIPAddress -AddressFamily IPv4
This can help when troubleshooting network connectivity.
9. Test an Internet or Network Connection
PowerShell includes a useful network testing command:
Test-NetConnection
To test connectivity to a website:
Test-NetConnection hgmssp.com
To test a specific port:
Test-NetConnection hgmssp.com -Port 443
Port 443 is normally used for secure HTTPS website traffic.
The output can show:
- Whether the destination responded
- The resolved IP address
- Whether a specific TCP port is open
- Which network interface was used
This makes Test-NetConnection more informative than a basic ping test.
10. View Saved Wi-Fi Profiles
To view Wi-Fi profiles saved on the computer, use:
netsh wlan show profiles
Although netsh is an older Windows command rather than a native PowerShell cmdlet, it works from a PowerShell window.
This can help identify old wireless networks that the computer still remembers.
To remove an unwanted Wi-Fi profile:
netsh wlan delete profile name="Network Name"
Replace Network Name with the correct Wi-Fi profile.
11. List Files and Folders
PowerShell uses Get-ChildItem to list files and folders.
For example:
Get-ChildItem
This displays items in the current folder.
To view the contents of another location:
Get-ChildItem "C:\Users"
To include hidden items:
Get-ChildItem -Force
To search all subfolders:
Get-ChildItem "C:\Users" -Recurse
Be cautious when using -Recurse on large drives because the command may take a long time.
12. Find Large Files
PowerShell is useful for locating files that are taking up significant storage space.
The following example searches a folder for files larger than 1 GB:
Get-ChildItem "C:\Users" -File -Recurse -ErrorAction SilentlyContinue |
Where-Object Length -gt 1GB |
Sort-Object Length -Descending |
Select-Object FullName, @{Name="SizeGB"; Expression={[math]::Round($_.Length / 1GB, 2)}}
This can help identify:
- Large downloads
- Old video files
- Backup archives
- Installation files
- Forgotten data folders
Do not delete files simply because they are large. Check what they are and whether they are still needed.
13. Find Recently Modified Files
To locate files changed within the last seven days:
Get-ChildItem "C:\Users" -File -Recurse -ErrorAction SilentlyContinue |
Where-Object LastWriteTime -gt (Get-Date).AddDays(-7) |
Sort-Object LastWriteTime -Descending
This can be useful when looking for a recently saved document or identifying files changed during a particular incident.
14. Create a New Folder
To create a folder:
New-Item -ItemType Directory -Path "C:\Reports"
You can also use:
mkdir "C:\Reports"
PowerShell supports several convenient aliases, although the full cmdlet names are generally clearer when writing scripts.
15. Copy Files
To copy a file:
Copy-Item "C:\Reports\report.docx" "D:\Backup"
To copy an entire folder:
Copy-Item "C:\Reports" "D:\Backup" -Recurse
The -Recurse option includes all files and subfolders.
16. Move or Rename Files
To move a file:
Move-Item "C:\Reports\report.docx" "C:\Archive"
To rename a file:
Rename-Item "C:\Reports\report.docx" "annual-report.docx"
Always verify file paths before running move or rename commands, particularly when working with business data.
17. Export Information to a CSV File
PowerShell can export results to a spreadsheet-friendly CSV file.
For example, to save a list of running processes:
Get-Process |
Select-Object Name, Id, CPU, WorkingSet |
Export-Csv "C:\Reports\processes.csv" -NoTypeInformation
The CSV file can then be opened in Microsoft Excel.
You can use the same method to export services:
Get-Service |
Export-Csv "C:\Reports\services.csv" -NoTypeInformation
This is especially useful for audits, troubleshooting and documentation.
18. Check Disk Space
To display disk usage:
Get-CimInstance Win32_LogicalDisk |
Select-Object DeviceID,
@{Name="SizeGB"; Expression={[math]::Round($_.Size / 1GB, 2)}},
@{Name="FreeGB"; Expression={[math]::Round($_.FreeSpace / 1GB, 2)}}
This provides a clear summary of total and available storage.
Low disk space can cause:
- Slow performance
- Failed updates
- Application errors
- Problems saving files
- Backup failures
Businesses should monitor storage proactively rather than waiting for drives to become completely full.
19. Check Installed Updates
To view installed Windows updates:
Get-HotFix
To sort them by installation date:
Get-HotFix | Sort-Object InstalledOn -Descending
This can help determine whether a particular update was recently installed.
However, not every Windows update appears through Get-HotFix, so it should not be treated as a complete update-management system.
20. View Windows Event Logs
Windows records system, application and security events in event logs.
To view recent system events:
Get-WinEvent -LogName System -MaxEvents 20
To view recent application events:
Get-WinEvent -LogName Application -MaxEvents 20
To search for errors:
Get-WinEvent -LogName System -MaxEvents 100 |
Where-Object LevelDisplayName -eq "Error"
Event logs can be extremely useful, but error messages often require interpretation. A single error does not always mean there is a serious problem.
21. Check Whether a File Exists
PowerShell can test whether a file or folder exists:
Test-Path "C:\Reports\report.docx"
The result will be either:
True
or:
False
This is particularly useful in scripts that need to verify a file before copying, moving or processing it.
22. Search Inside Text Files
To search for a word or phrase inside a text file:
Select-String -Path "C:\Logs\application.log" -Pattern "error"
To search multiple log files:
Select-String -Path "C:\Logs\*.log" -Pattern "error"
This can save time when reviewing large log files.
23. Check File Hashes
A file hash acts like a digital fingerprint.
To calculate the SHA-256 hash of a file:
Get-FileHash "C:\Downloads\installer.exe"
You can compare this result with a hash published by the software provider.
Matching hashes can help confirm that a file was downloaded correctly and has not been changed. However, a hash is only useful when the comparison value comes from a trusted source.
24. View Command History
To view commands used during the current session:
Get-History
To run a previous command again:
Invoke-History 3
Replace 3 with the relevant history number.
You can also use the up and down arrow keys to move through previously entered commands.
25. Find Help for a Command
PowerShell includes built-in help.
To learn about a command:
Get-Help Get-Process
To see examples:
Get-Help Get-Process -Examples
To view detailed help:
Get-Help Get-Process -Detailed
You can also search for commands:
Get-Command *network*
This is one of the best ways to learn PowerShell safely.
How PowerShell Pipelines Work
The pipe character looks like this:
|
It sends the result of one command into another.
For example:
Get-Process | Sort-Object CPU -Descending
This retrieves all processes and then sorts them by CPU usage.
A more advanced example is:
Get-Service |
Where-Object Status -eq "Running" |
Sort-Object DisplayName
This:
- Retrieves all services.
- Keeps only running services.
- Sorts them alphabetically.
Pipelines are one of PowerShell’s most important features.
Useful PowerShell Safety Tips
PowerShell is powerful, which means incorrect commands can cause problems.
Before running a command:
- Check the spelling carefully.
- Confirm the file or folder path.
- Understand what the command will change.
- Avoid copying unknown scripts from websites or social media.
- Do not disable security controls without a clear reason.
- Use administrator mode only when required.
- Back up important data before making significant changes.
- Test scripts on a non-critical device when possible.
Be especially cautious with commands containing:
Remove-Item
Stop-Process
Stop-Service
Set-ExecutionPolicy
Invoke-Expression
These commands are not inherently malicious, but they can cause damage when used incorrectly.
What Is a PowerShell Script?
A PowerShell script is a text file containing one or more PowerShell commands.
PowerShell scripts normally use the .ps1 file extension.
For example, a simple script could collect system information and save it to a file:
Get-ComputerInfo |
Out-File "C:\Reports\computer-information.txt"
Scripts can be used to automate:
- Daily reports
- File organisation
- Computer health checks
- User account management
- Software deployment
- Backup verification
- Network testing
- Microsoft 365 administration
In a business environment, scripts should be documented, tested and protected from unauthorised changes.
Should You Change the PowerShell Execution Policy?
PowerShell includes an execution policy that controls how scripts are handled.
You can view the current policy with:
Get-ExecutionPolicy -List
Some online guides immediately recommend changing the execution policy to allow all scripts. This is rarely a good idea.
Avoid setting the policy to Unrestricted unless there is a specific, understood and approved reason.
Execution policy is only one layer of protection, but weakening it unnecessarily increases risk. Business users should speak to their IT provider before changing PowerShell security settings.
PowerShell and Cybersecurity
PowerShell is a legitimate Windows administration tool, but attackers may also attempt to misuse it.
Security systems often monitor PowerShell because malicious scripts can be used to:
- Download harmful files
- Change security settings
- Run hidden commands
- Steal credentials
- Move across a network
- Maintain unauthorised access
Businesses should not simply block PowerShell completely because it is valuable for legitimate administration. Instead, they should use appropriate controls such as:
- Endpoint detection and response
- Script logging
- Application control
- Restricted administrator access
- Microsoft Defender protections
- Privileged access management
- Staff security awareness
- Regular monitoring and auditing
Good security separates legitimate administrative activity from suspicious behaviour.
PowerShell for Business IT Management
PowerShell becomes particularly valuable when managing multiple computers.
An IT team can use it to:
- Collect information from many devices
- Check installed software
- Review service status
- Configure Windows settings
- Manage Microsoft 365
- Create and update user accounts
- Audit permissions
- Deploy approved software
- Generate compliance reports
- Investigate security incidents
However, automation should be carefully governed. A mistake in a script can affect many users at once, so testing, approval and change control are essential.
Common PowerShell Mistakes
Running Everything as Administrator
Most information-gathering commands do not require elevated permissions. Using administrator mode unnecessarily increases the impact of mistakes.
Copying Commands Without Understanding Them
A command may contain hidden or unexpected actions. Always read and understand it before pressing Enter.
Ignoring Error Messages
PowerShell error messages often explain what went wrong. Read the full message rather than repeatedly running the same command.
Using the Wrong File Path
Spaces, spelling mistakes and incorrect drive letters frequently cause problems. Put paths containing spaces inside quotation marks.
For example:
Get-ChildItem "C:\Company Documents"
Deleting Instead of Moving
When cleaning files, moving them to a review folder is often safer than permanently deleting them.
Making Scripts Too Complicated
Start with a simple command and confirm that it works. Add filtering, exporting and automation gradually.
Everyday PowerShell Commands at a Glance
Here are some of the most useful commands covered in this guide:
Get-ComputerInfo
Get-Process
Get-Service
Get-NetIPConfiguration
Test-NetConnection
Get-ChildItem
Copy-Item
Move-Item
Test-Path
Get-FileHash
Get-WinEvent
Get-HotFix
Get-Help
Learning these commands can make routine Windows troubleshooting faster and more consistent.
Final Thoughts
PowerShell is not only for programmers or enterprise administrators. It can be a practical tool for everyday Windows tasks, from checking disk space and network settings to finding files and reviewing running processes.
The safest way to learn is to begin with read-only commands such as Get-Process, Get-Service and Get-ComputerInfo. Once you understand how PowerShell displays and filters information, you can gradually explore automation and scripting.
For businesses, PowerShell can significantly improve IT efficiency, but it must be used alongside proper security controls, documentation and professional oversight.
Hamilton Group provides Windows support, Microsoft 365 management, cybersecurity, device monitoring and proactive IT services for organisations across Yorkshire and beyond.
To discuss Windows management, automation or business IT support, call 0330 043 0069 or visit hgmssp.com.