This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ServiceDisplayName = "Docker Desktop Service" | |
| # Stop all Docker processes | |
| Stop-Process -Name *docker* -Force 2>$null | |
| # Stop Docker Desktop Service and make sure it's stopped before continuing | |
| $dockerService = Get-Service -DisplayName $ServiceDisplayName | |
| while ($dockerService.Status -eq "Running") { | |
| $dockerService = Get-Service -DisplayName $ServiceDisplayName |