How To start/stop IIS 6.0/7.0 remotely using PowerShell Scripts?

后端 未结 6 2632
一向
一向 2021-02-20 04:42

I have two servers Server A and Server B. I want to stop server A from Server B remotely using Powershell script.

6条回答
  •  执笔经年
    2021-02-20 04:54

    Because you asked for Powershell:

    (Get-WmiObject Win32_Service -ComputerName ServerA -Filter "Name='iisadmin'").InvokeMethod("StopService", $null) 
    

    Agreed this question should be moved to ServerFault.

提交回复
热议问题