Compartilhar via


How to manage processes and services

Because SMB is often blocked, and Remote Desktop is not supported, managing processes and services on Nano Server may require a different pattern. PowerShell Remoting over Windows Remote Management (WSMan) and web-based Server Management Tools (SMT) can provide a robust method to manage processes and services on Nano Server.

  1. Connect to Nano Server remotely.

    To access Nano Server remotely, please follow the steps in How to access Nano Server.

  2. To manage processes

    To list all running processes:

    Get-Process
    

    You can filter by name:

    Get-Process -Name *svc*
    

    Or use a "where" clause for more powerful filtering:

    Get-Process | where PeakPagedMemorySize -gt 100MB
    

    Tip  Once you’ve typed "where" and the following space, you can press Ctrl+Spacebar for an IntelliSense list of possible property values.

     

    To find out which properties a process object has:

    Get-Process | Get-Member
    

    To kill one or more processes, pipe the result of a Get-Process cmdlet to Stop-Process:

    Get-Process -Name winword | Stop-Process
    

    Or use Stop-Process directly:

    Stop-Process -Name groove, notepad
    

    To start a process:

    Start-Process -FilePath C:\Windows\notepad.exe
    

    To list the top 10 processes with the highest CPU utilization:

    Get-Process | sort -Descending | select -First 10
    
  3. To manage services

    To list all running services:

    Get-Service
    

    You can filter by name:

    Get-Service -Name win*
    

    Or use a where clause for more powerful filtering:

    Get-Service | where Status -eq Stopped
    

    To register a service:

    New-Service -Name myService -BinaryPathName C:\Services\myService.exe -StartupType Manual
    

    To start a service, pipe the result of a Get-Service cmdlet to Start-Service:

    Get-Service -Name wec* | Start-Service
    

    Or use Start-Service directly:

    Start-Service -Name wec*
    

    To stop a service:

    Get-Service -Name wec* | Stop-Service