Monday, 17 December 2012

Start (and Stop) Microsoft Dynamics CRM 2011 Services using PowerShell

Today I spent a good deal of time trying to sort out some MS Dynamics CRM 2011 issues and  I had to start some services time and time again, so I wondered whether I could just script the whole thing and it turns out that you can, but a one liner will do to restart all MS Dynamics CRM services.

get-service | where {$_.Name -like "*CRM*" -or $_.Name -like "W3SVC"}| ForEach-Object {Restart-Service –DisplayName $_.DisplayName}

As you can probably imagine there is a Start-Service and a Stop-Service cmdlet in PowerShell.

No comments:

Post a Comment