Skip to content

Instantly share code, notes, and snippets.

@mark05e
Last active January 15, 2025 02:33
Show Gist options
  • Save mark05e/0468c36967d95ba79c88115c1b82be8c to your computer and use it in GitHub Desktop.
Save mark05e/0468c36967d95ba79c88115c1b82be8c to your computer and use it in GitHub Desktop.
# STOP AND DISABLE ALL EXCHANGE SERVICES WITH A SINGLE LINE
# ref - http://ccmblogs.co.uk/?p=293
get-service | ?{$_.DisplayName -ilike "Microsoft Exchange*"} | stop-service
get-service | ?{$_.DisplayName -ilike "Microsoft Exchange*"} | set-service -StartupType Disabled
get-service | ?{$_.DisplayName -ilike "Microsoft Exchange*"} | select status, starttype, name, displayname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment