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
```
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
```