Advertisement
Guest User

Untitled

a guest
Mar 4th, 2021
6,810
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $autos = "MSExchangeADTopology",
  2. "MSExchangeAntispamUpdate",
  3. "MSExchangeDagMgmt",
  4. "MSExchangeDiagnostics",
  5. "MSExchangeEdgeSync",
  6. "MSExchangeFrontEndTransport",
  7. "MSExchangeHM",
  8. "MSExchangeImap4",
  9. "MSExchangeIMAP4BE",
  10. "MSExchangeIS",
  11. "MSExchangeMailboxAssistants",
  12. "MSExchangeMailboxReplication",
  13. "MSExchangeDelivery",
  14. "MSExchangeSubmission",
  15. "MSExchangeRepl",
  16. "MSExchangeRPC",
  17. "MSExchangeFastSearch",
  18. "HostControllerService",
  19. "MSExchangeServiceHost",
  20. "MSExchangeThrottling",
  21. "MSExchangeTransport",
  22. "MSExchangeTransportLogSearch",
  23. "MSExchangeUM",
  24. "MSExchangeUMCR",
  25. "FMS",
  26. "IISADMIN",
  27. "RemoteRegistry",
  28. "SearchExchangeTracing",
  29. "Winmgmt",
  30. "W3SVC"
  31.  
  32. $mans = "MSExchangePop3",
  33. "MSExchangePOP3BE",
  34. "wsbexchange",
  35. "AppIDSvc",
  36. "pla"
  37.  
  38. #Enable Services
  39. foreach($service in $autos)
  40. {
  41.    Set-Service -Name $service -StartupType Automatic
  42.    Write-Host "Enabling "$service
  43. }
  44. foreach($service2 in $mans)
  45. {
  46.    Set-Service -Name $service2 -StartupType Manual
  47.    Write-Host "Enabling "$service2
  48. }
  49.  
  50.  
  51. #Start Services
  52. foreach($service in $autos)
  53. {
  54.    Start-Service  -Name $service
  55.    Write-Host "Starting "$service
  56. }
  57.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement