Tag Archives: Exchange 2013

Stop and disable All Exchange 2013 Services with a Single Command

Don’t get involved with Exchange too much but thought this was a cool command to use to stop all Exchange services in one (or maybe two) attempts.

The scenario was a test Exchange server with all services running on a single machine and needed to stop all services to perform a recovery operation.

Open PowerShell using Run as Administrator and then run this command.

  • get-service | ?{$_.Name -ilike “MSexch*”} | stop-service

If some services fail to stop because dependent services are running just run the command a second time straightaway.

To disable the services run this:

  • get-service | ?{$_.Name -ilike “MSexch*”} | set-service -StartupType Disabled

Exchange 2013 SP1 Setup Fails – PowerShell Execution Policy Prerequisite Failure

Just done a clean install of Exchange 2013 SP1 and the prerequisite check fails with an error relating to the PowerShell Execution Policy.

The Root Cause

The Exchange setup stops the WMI service and the WMI service is required to query Active Directory. If the PowerShell Execution Policy is defined using a Group Policy object then the Exchange setup will not be able to verify the execution policy so setup fails.

The Fix

Temporarily disable the PowerShell Execution Policy using the Group Policy Management Editor.

  • Open the Group Policy Management console.
  • Navigate to the Default Domain Policy node and select Edit.

This opens the Group Policy Management Editor.

  • Navigate to Computer Configuration # Policies # Administrative Templates # Windows Components # Windows PowerShell.
  • In the details pane ensure the Turn on Script Execution is set to Not Configured.
  • On the Exchange server run GPUpdate /force.
  • Rerun Exchange setup.
  • Once the Exchange install is complete, re-enable the PowerShell Execution Policy Group Policy object to its previous setting.

http://support.microsoft.com/kb/2810617 for more information.