SSH Command in Windows with examples

Processes and services commands in Windows

See what is running, stop what is stuck and manage services.

#tasklist / Get-Process

List running programs

Syntaxtasklist [options]
  • tasklistCMD

    Every process

  • tasklist | findstr chromeCMD

    Find one program

  • tasklist /svcCMD

    Show which services run inside each process

  • Get-Process | Sort-Object CPU -Descending | Select -First 10PowerShell

    The ten busiest processes

#taskkill / Stop-Process

Stop a program

Syntaxtaskkill /PID number | /IM name
  • taskkill /PID 1234CMD

    Stop by process number

  • taskkill /IM notepad.exe /FCMD

    Force-stop by name

  • Stop-Process -Name notepad -ForcePowerShell

    PowerShell way

#start

Start a program

Syntaxstart program
  • start notepadCMD

    Open an app

  • start "" "C:\Program Files\App\app.exe"CMD

    Open a path with spaces

  • start .CMD

    Open the current folder in File Explorer

#sc / Get-Service

Manage services

Syntaxsc query name
  • sc queryCMD

    List services

  • sc query SpoolerCMD

    One service

  • net start SpoolerCMD

    Start a service (administrator)

  • net stop SpoolerCMD

    Stop a service

  • Get-Service | Where-Object Status -eq RunningPowerShell

    Running services

  • Restart-Service SpoolerPowerShell

    Restart one

#schtasks

Scheduled tasks

Syntaxschtasks /create ...
  • schtasks /queryCMD

    List tasks

  • schtasks /create /tn "Backup" /tr "C:\scripts\backup.bat" /sc daily /st 02:00CMD

    Run every day at 02:00

  • schtasks /run /tn "Backup"CMD

    Run it now

  • schtasks /delete /tn "Backup" /fCMD

    Remove it

#shutdown

Shut down or restart

Syntaxshutdown [options]
  • shutdown /r /t 60CMD

    Restart in 60 seconds

  • shutdown /s /t 0CMD

    Shut down now

  • shutdown /aCMD

    Cancel a pending shutdown

#Get-CimInstance

Query system details

SyntaxGet-CimInstance class
  • Get-CimInstance Win32_OperatingSystemPowerShell

    Windows version and install date

  • Get-CimInstance Win32_LogicalDiskPowerShell

    Drives and free space

TipThe old wmic tool is being removed from new Windows versions; use these PowerShell commands instead.

#Get-WinEvent

Read Windows logs

SyntaxGet-WinEvent -LogName System
  • Get-WinEvent -LogName System -MaxEvents 20PowerShell

    The last 20 system events

  • Get-WinEvent -FilterHashtable @{LogName='System'; Level=2} -MaxEvents 20PowerShell

    Errors only

Run these commands with SSH Command

SSH Command is a desktop app for Mac, Windows and Linux that puts a real terminal, SFTP file panes, a sudo switch and a searchable Linux command finder in one window. Type what you want to do, and send the command to your server with one click.

Download free Linux commands with examples SFTP & FTP client