Service:

  1. get-service
    powershell_powershell

     

     

  2. start-service
    start-service -name spooler -v

     

  3. stop-service

  4. restart-service
    get-service -name spooler | restart-service

     

  5. get-service      
    powershell_powershell_02

     

     

  6. get-service | findstr httpd                    Case-Sensitive

  7. 获取停止的服务
    get-service | where {$_.status -match 'stopped'}

     

 

Process

  1. ps === get-process

  2. powershell_powershell_03

     

     

 

文本处理

  1. get-content === cat

  2. select-string String file
    powershell_powershell_04