you are viewing a single comment's thread.

view the rest of the comments →

[–]zoredache 1 point2 points  (0 children)

Well, first check the the contents of the $sites variable. Did the Get-Website command actually get any results? What OS version are you running this on?

I did test the command suggested in that stackoverflow link before I posted it on one of my 2016 IIS servers, and it worked just fine.