Last active
May 8, 2020 14:53
-
-
Save SQLtattoo/07524b8abde2673fd27420dc9c4aeb71 to your computer and use it in GitHub Desktop.
Disabling multiple Windows services
This file contains 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
# this populates a variable with all Windows Services starting with 'Microsoft Dynamics' | |
$svcs = Get-Service | where DisplayName -Like "Microsoft Dynamics*" | |
foreach($svc in $svcs) | |
{ | |
Write-Host "Disabling service $($svc.Name)" | |
Set-Service -ServiceName $svc.Name -StartupType Disabled | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment