Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Disabling multiple Windows services
# 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