Answer the question
In order to leave comments, you need to log in
How to leave and start IIS on a remote machine using Powershell?
Good afternoon, please tell me
On one virtual machine, a PS script is launched, the purpose of which is to stop IIS on another virtual machine, after which we can immediately start it again.
I'm trying to do it in the following way, at least stop it, but it doesn't work
Enter-PSSession 140vm-elmaelastic.ad.vz
Get-Process w3wp* | Stop-Process -Force
Exit-PSSession
Answer the question
In order to leave comments, you need to log in
icm -comp *hostname* -sc {restart-service w3svc,was -force}
icm -comp *hostname* -sc {iisreset /restart}
iisreset *hostname* /restart
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question