Mar 19, 2020 5 min read

PowerShell for Windows: Essential Commands, App Management & Automation

# PowerShell for Windows: Essential Commands, App Management & Automation PowerShell is hands-down one of the most useful tools Microsoft has ever built for Windows. It's not just a replacement for the old DOS command prompt — it's a full task automation and configuration management framework built

PowerShell for Windows: Essential Commands, App Management & Automation

PowerShell is hands-down one of the most useful tools Microsoft has ever built for Windows. It's not just a replacement for the old DOS command prompt — it's a full task automation and configuration management framework built on .NET. If you're still typing ping and ipconfig in cmd.exe, you're missing out on a world of automation. For more details, check out Building a Real-Time Chat App with Laravel Livewire and Push. For more details, check out Unlocking Your Internal Drives After Windows 11 Installation. For more details, check out A Step-by-Step Guide to Setting Up Whonix for Enhanced Inter.

In this guide, I'll cover the PowerShell commands I use daily, plus one of the most practical things you can do with PowerShell: removing all that pre-installed bloatware from Windows 10.

Before You Start: Run PowerShell as Administrator<

Windows PowerShell terminal window with command output

/h2>

Most of what we're going to do requires admin rights. Always right-click the PowerShell icon and select Run as administrator. If you're on a 64-bit system, make sure you're using the 64-bit version of PowerShell.

Essential PowerShell Commands

PowerShell

Let's start with the commands every Windows admin — or power user — should know.

1. Get-Help — Your Lifeline

This is the first cmdlet you should learn. Get-Help shows you documentation for any other PowerShell command. If you ever forget how a command works, this is your answer:

Get-Help -Name Get-Process

You can also use Get-Command to find commands by keyword:

Get-Command *service*

2. Working with the Execution Policy

PowerShell has an execution policy that controls what scripts can run on your system. This is a safety feature, but it can also be a headache when you're first starting out.

Here are the common policies:

# Restricted — no scripts can run (default on most systems)
Set-ExecutionPolicy Restricted -Scope LocalMachine -Force

# AllSigned — only scripts signed by a trusted publisher
Set-ExecutionPolicy AllSigned -Scope LocalMachine -Force

# RemoteSigned — local scripts run, remote ones must be signed
Set-ExecutionPolicy RemoteSigned -Scope LocalMachine -Force

# Unrestricted — all scripts can run (not recommended for production)
Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force

I usually set mine to RemoteSigned — it's a good balance between security and convenience.

3. Get-ExecutionPolicy — Check Before You Run

If you're working on an unfamiliar machine, always check what execution policy is active before trying to run a script:

Get-ExecutionPolicy

4. Get-Service — Manage Windows Services

Need to see what services are running on your machine? Get-Service lists all of them. You can filter by name with wildcards:

# List all services
Get-Service

# Find a specific service
Get-Service -Name *spooler*

# Check the status
Get-Service -Name Spooler | Select-Object Name, Status, StartType

You can then pipe those results into Start-Service, Stop-Service, or Set-Service to manage them.

5. Get-Process — See What's Running

Just like Get-Service but for running processes:

# Show all running processes
Get-Process

# Find a specific process
Get-Process -Name chrome

6. Stop-Process — Kill Stuck Processes

When an application freezes (and we all know that happens), you can kill it with PowerShell instead of opening Task Manager:

# Kill by process name
Stop-Process -Name notepad

# Kill by process ID
Stop-Process -ID 2668

Removing Windows 10 Pre-Installed Apps with PowerShell

Now let's get to the practical stuff. Windows 10 ships with a ton of apps you probably don't want — Candy Crush, Xbox-related apps, Twitter, and more. Here's how to nuke them with PowerShell.

Method 1: Remove Apps from the Installation Image

This method removes apps before you even install Windows. It's useful if you're building a custom install USB.

You'll need a PowerShell script originally created by Andre Picker on TechNet. Download the script, extract it to the root of your drive (I use D:\), then:

# First, allow script execution
Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force

# Run the remove apps script
D:\.\removeapps.ps1 -pathtowim C:\full\path\to\your\install.wim -selectapps $true

You'll be prompted with each app — enter Y for the ones you want to remove. After it finishes, copy the modified install.wim to the sources folder on your USB stick. Boot from that USB and you'll get a clean Windows install with all that bloatware gone.

Method 2: Remove Apps from an Existing Windows Installation

Already installed Windows 10 and want to clean it up? Use these commands directly in PowerShell (run as administrator).

First, set the execution policy:

Set-ExecutionPolicy Unrestricted -Scope LocalMachine -Force

Then remove the apps one by one. Here's the full list of commands I use:

Get-AppxPackage -AllUsers *3dbuilder* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowsalarms* | Remove-AppxPackage
Get-AppxPackage -AllUsers *Appconnector* | Remove-AppxPackage
Get-AppxPackage -AllUsers *Asphalt8Airborne* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowscamera* | Remove-AppxPackage
Get-AppxPackage -AllUsers *CandyCrushSodaSaga* | Remove-AppxPackage
Get-AppxPackage -AllUsers *DrawboardPDF* | Remove-AppxPackage
Get-AppxPackage -AllUsers *Facebook* | Remove-AppxPackage
Get-AppxPackage -AllUsers *WindowsFeedbackHub* | Remove-AppxPackage
Get-AppxPackage -AllUsers *officehub* | Remove-AppxPackage
Get-AppxPackage -AllUsers *skypeapp* | Remove-AppxPackage
Get-AppxPackage -AllUsers *getstarted* | Remove-AppxPackage
Get-AppxPackage -AllUsers *zunemusic* | Remove-AppxPackage
Get-AppxPackage -AllUsers *windowsmaps* | Remove-AppxPackage
Get-AppxPackage -AllUsers *Messaging* | Remove-AppxPackage
Get-AppxPackage -AllUsers *solitairecollection* | Remove-AppxPackage
Get-AppxPackage -AllUsers *ConnectivityStore* | Remove-AppxPackage
Get-AppxPackage -AllUsers *zunevideo* | Remove-AppxPackage
Get-AppxPackage -AllUsers *OneConnect* | Remove-AppxPackage
Get-AppxPackage -AllUsers *Office.Sway* | Remove-AppxPackage
Get-AppxPackage -AllUsers *Twitter* | Remove-AppxPackage
Get-AppxPackage -AllUsers *xboxapp* | Remove-AppxPackage
Get-AppxPackage -AllUsers *XboxOneSmartGlass* | Remove-AppxPackage

Note: The *ContactSupport* app can't be removed in newer versions of Windows 10, so I've left that one out.

To remove apps for the current user only (without the -AllUsers flag):

Get-AppxPackage *CandyCrushSodaSaga* | Remove-AppxPackage

Creating a Removal Script

If you do this regularly (I do), save all your removal commands into a .ps1 file:

# remove-bloatware.ps1
Write-Host "Removing Windows 10 bloatware..." -ForegroundColor Green

$apps = @(
    "*3dbuilder*",
    "*CandyCrushSodaSaga*",
    "*Facebook*",
    "*skypeapp*",
    "*xboxapp*",
    "*Twitter*",
    "*windowsalarms*",
    "*zunemusic*",
    "*windowsmaps*"
)

foreach ($app in $apps) {
    Get-AppxPackage -AllUsers $app | Remove-AppxPackage
    Write-Host "Removed: $app" -ForegroundColor Yellow
}

Write-Host "Done! You may want to restart." -ForegroundColor Green

Just run .\\remove-bloatware.ps1 as administrator and watch the apps disappear.

Putting It All Together

Here's a quick PowerShell workflow I use when setting up a new Windows machine:

  1. Check execution policy: Get-ExecutionPolicy
  2. Set it to RemoteSigned: Set-ExecutionPolicy RemoteSigned -Scope LocalMachine -Force
  3. Remove bloatware: Run the commands above
  4. Check running services: Get-Service to see what's running and disable what I don't need
  5. Verify everything: Get-Process to make sure nothing unexpected is running

What's Next?

PowerShell can do so much more — managing Active Directory, automating backups, configuring network settings, and even working with cloud services like Azure. The cmdlets I've covered here are the foundation. Start with these, get comfortable with the pipeline (the | operator that passes output from one command to the next), and you'll find yourself using PowerShell for more and more tasks.

Check out my free software page for other useful tools and apps that pair well with a clean Windows setup.