Quantcast
Channel: AutoSPInstaller
Viewing all articles
Browse latest Browse all 2279

Created Unassigned: Stop-DefaultWebsite stops wrong IIS website [22333]

$
0
0
Function Stop-DefaultWebsite

Specifically
```
$defaultWebsite = Get-Website | Where-Object {$_.Name -eq "Default Web Site" -or $_.ID -eq 1 -or $_.physicalPath -eq "%SystemDrive%\inetpub\wwwroot"}

```
Stops wrong site. In my case it stopped SPWeb services
```

Name ID State Physical Path Bindings
---- -- ----- ------------- --------
SharePoint Web 1 Started C:\Program Files\Common http *:32843:
Services Files\Microsoft Shared\Web https *:32844:
Server sslFlags=0
Extensions\16\WebServices\Root net.tcp 32845:*
net.pipe *

```
please remove this from where statement
```
$_.ID -eq 1
```

Viewing all articles
Browse latest Browse all 2279

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>