Command Center

PowerShell Command Library

PowerShell works with objects, not text — which makes filtering and reporting far easier once you learn the pattern. Start with the read-only cmdlets.

DM TECH never runs commands on your PC. Every command here is reference text you copy and run yourself, in a window you control. Read what a command does before running it, and back up important data first.

18 cmdlets

Get-ComputerInfo

System InformationRead-only

Returns a large object describing the operating system, BIOS, processor and Windows install details.

Get-ComputerInfo

How to run it

  1. 1.Open Terminal or Windows PowerShell.
  2. 2.Run the cmdlet — it takes a few seconds to collect data.
  3. 3.Select just the properties you need to keep the output readable.

Example

Get-ComputerInfo | Select-Object OsName, OsVersion, CsManufacturer, CsModel, CsTotalPhysicalMemory

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Get-CimInstance Win32_BIOS

System InformationRead-only

Reads BIOS/UEFI information including manufacturer, version and serial number.

Get-CimInstance Win32_BIOS

How to run it

  1. 1.Open PowerShell.
  2. 2.Run the cmdlet.
  3. 3.Use Select-Object to pick the fields you need.

Example

Get-CimInstance Win32_BIOS | Select-Object Manufacturer, SMBIOSBIOSVersion, SerialNumber

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Before you run this

The serial number identifies the machine — remove it before sharing output publicly.

Get-Process

Processes & ServicesRead-only

Lists running processes as objects, so you can sort and filter by CPU, memory or name.

Get-Process

How to run it

  1. 1.Open PowerShell.
  2. 2.Run Get-Process.
  3. 3.Pipe into Sort-Object and Select-Object to find the heaviest processes.

Example

Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 Name, CPU, WS

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Get-Service

Processes & ServicesRead-only

Lists Windows services and their status.

Get-Service

How to run it

  1. 1.Open PowerShell.
  2. 2.Run Get-Service.
  3. 3.Filter by status or name to find what you are after.

Example

Get-Service | Where-Object Status -eq 'Stopped' | Select-Object Name, DisplayName

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Restart-Service

Processes & ServicesAdministrator required

Stops and restarts a Windows service in one step.

Restart-Service -Name <service>

How to run it

  1. 1.Open PowerShell as administrator.
  2. 2.Confirm the service name with Get-Service.
  3. 3.Run Restart-Service.

Example

Restart-Service -Name Spooler

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Before you run this

Restarting a service interrupts anything using it. Do not restart services you cannot identify.

Get-Volume

StorageRead-only

Shows every volume with its file system, health status and free space.

Get-Volume

How to run it

  1. 1.Open PowerShell.
  2. 2.Run Get-Volume.
  3. 3.Check the HealthStatus and SizeRemaining columns.

Example

Get-Volume | Sort-Object SizeRemaining

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Get-PhysicalDisk

StorageRead-only

Lists physical drives with media type, bus type and operational health.

Get-PhysicalDisk

How to run it

  1. 1.Open PowerShell.
  2. 2.Run the cmdlet.
  3. 3.Confirm each disk reports Healthy.

Example

Get-PhysicalDisk | Select-Object FriendlyName, MediaType, HealthStatus, Size

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Repair-Volume

StorageAdministrator required

The PowerShell equivalent of chkdsk. -Scan is read-only; -OfflineScanAndFix repairs.

Repair-Volume -DriveLetter C -Scan

How to run it

  1. 1.Open PowerShell as administrator.
  2. 2.Run with -Scan first to check without changing anything.
  3. 3.Only use -OfflineScanAndFix when a scan reports problems.

Example

Repair-Volume -DriveLetter C -Scan

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Before you run this

Repair modes take the volume offline. Back up important data before repairing a suspect drive.

Test-NetConnection

NetworkingRead-only

Tests reachability of a host, optionally on a specific TCP port, and reports route and latency details.

Test-NetConnection <host> -Port <port>

How to run it

  1. 1.Open PowerShell.
  2. 2.Run the cmdlet with a hostname.
  3. 3.Add -Port to test a specific service.

Example

Test-NetConnection example.com -Port 443

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Get-NetIPConfiguration

NetworkingRead-only

Shows adapter IP configuration in a readable object form — the modern replacement for ipconfig.

Get-NetIPConfiguration

How to run it

  1. 1.Open PowerShell.
  2. 2.Run the cmdlet.
  3. 3.Add -Detailed for DNS and gateway specifics.

Example

Get-NetIPConfiguration -Detailed

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Get-NetTCPConnection

NetworkingAdministrator required

Lists TCP connections and listening ports with owning process IDs.

Get-NetTCPConnection

How to run it

  1. 1.Open PowerShell as administrator for complete results.
  2. 2.Run the cmdlet.
  3. 3.Filter by State or LocalPort.

Example

Get-NetTCPConnection -State Listen | Select-Object LocalAddress, LocalPort, OwningProcess

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Get-HotFix

Updates & AppsRead-only

Lists installed Windows updates with their KB number and install date.

Get-HotFix

How to run it

  1. 1.Open PowerShell.
  2. 2.Run Get-HotFix.
  3. 3.Sort by InstalledOn to see the most recent updates.

Example

Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Get-AppxPackage

Updates & AppsRead-only

Lists Microsoft Store / packaged apps installed for the current user.

Get-AppxPackage

How to run it

  1. 1.Open PowerShell.
  2. 2.Run Get-AppxPackage.
  3. 3.Filter by Name to find a specific app.

Example

Get-AppxPackage | Select-Object Name, PackageFullName | Sort-Object Name

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Before you run this

Removing packaged apps with Remove-AppxPackage can break dependent Windows features. Only remove apps you can reinstall from the Store.

List startup entries

System InformationRead-only

Lists programs configured to run at sign-in from the registry and startup folders.

Get-CimInstance Win32_StartupCommand

How to run it

  1. 1.Open PowerShell.
  2. 2.Run the cmdlet.
  3. 3.Compare with Task Manager's Startup apps tab.

Example

Get-CimInstance Win32_StartupCommand | Select-Object Name, Command, Location

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Get-MpComputerStatus

SecurityAdministrator required

Reports Microsoft Defender status: real-time protection, signature versions and last scan times.

Get-MpComputerStatus

How to run it

  1. 1.Open PowerShell as administrator.
  2. 2.Run the cmdlet.
  3. 3.Check RealTimeProtectionEnabled and the signature dates.

Example

Get-MpComputerStatus | Select-Object RealTimeProtectionEnabled, AntivirusSignatureLastUpdated

Works on: Windows 10 · Windows 11 with Microsoft Defender

Get-ExecutionPolicy

Automation BasicsRead-only

Shows the script execution policy for every scope, which explains why a downloaded script refuses to run.

Get-ExecutionPolicy -List

How to run it

  1. 1.Open PowerShell.
  2. 2.Run Get-ExecutionPolicy -List.
  3. 3.Read the effective policy for CurrentUser and LocalMachine.

Example

Get-ExecutionPolicy -List

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Before you run this

Execution policy is a safety guard, not a security boundary. Only widen it deliberately, for the smallest scope, and set it back afterwards.

Unblock-File

Automation BasicsRead-only

Removes the mark-of-the-web flag Windows adds to files downloaded from the internet.

Unblock-File -Path <file>

How to run it

  1. 1.Open the folder containing the downloaded script.
  2. 2.Open PowerShell in that folder.
  3. 3.Run Unblock-File on the specific file after you have reviewed its contents.

Example

Unblock-File -Path .\DMTech-System-Report.ps1

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

Before you run this

Only unblock files you have read and trust. The download flag exists to stop untrusted scripts running silently.

Get-Help

Automation BasicsRead-only

Shows built-in documentation and worked examples for any cmdlet.

Get-Help <cmdlet> -Examples

How to run it

  1. 1.Open PowerShell.
  2. 2.Run Get-Help with the cmdlet name.
  3. 3.Add -Examples or -Full for more detail.

Example

Get-Help Get-Process -Examples

Works on: Windows 10 · Windows 11 · PowerShell 5.1+

New to PowerShell? Start with the PowerShell basics tutorial.