Score:-1

Stop and Start IIS Website remotely using WMSVC

sk flag

We have configured access to a web site on a remote machine using the guide here. This lets us access the remote web site using WMSVC. The end goal though is we want to be able to connect to the site remotely and stop and start it using powershell. Note that although this seems to grant access to the specific website, the user DOES NOT have any permissions on the web server itself so doing things like PSExec or Invoke-Command seemingly do not work.

Is this possible? I've seen appcmd but it doesn't seem like that gives permissions unless I use PSExec. Is there a way to send the command through WMSVC if there is no PS way to do it? Anything would help, thanks!

spikey_richie avatar
gb flag
Have you enabled remote execution of PowerShell commands on the target machine?
Score:1
vn flag

WMSVC was solely developed for IIS Manager remote management. Remote PowerShell management isn't going through WMSVC. Thus, "The end goal though is we want to be able to connect to the site remotely and stop and start it using powershell" just led you to a dead end.

The actual web service contracts of WMSVC is not documented, so unless you use IIS Manager there isn't a way to start/stop IIS sites remotely.

PowerShell remoting or IIS Administration API are your best shots.

Element Zero avatar
sk flag
Yes, I can't use powershell remoting due to security restrictions on the server. I thought that the WMSVC was a long shot but wasn't sure where to go from there. Thanks for the tip on the IIS Admin API, I'll check there next.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.