Quick Tip: Quickly Set Skype Services to Disabled or Automatic Delayed Start

There may be time where a system was improperly maintained and the services are left in a disabled state, or perhaps you’re performing maintenance and you need those services to stay in a disabled state.  Rather than going through them one-by-one and changing the startup-type, here’s a quick PowerShell command you can run to flip all Skype for Business or Lync Server services from Disabled to Automatic (Delayed Start) and vice versa.

To set all Skype and Lync services (not including SQL and IIS) to Automatic (Delayed Start) run the following PowerShell command:

get-service |where {$_.displayname -match “Skype*|Lync*”}|foreach {$mycommand=”sc.exe config $($_.name) start=delayed-auto”;invoke-expression -command $mycommand}

To set all Skype and Lync services (not including SQL and IIS) to disabled run the following PowerShell command:

get-service |where {$_.displayname -match “Skype*|Lync*”}|foreach {$mycommand=”sc.exe config $($_.name) start=disabled”;invoke-expression -command $mycommand}

 

One thought on “Quick Tip: Quickly Set Skype Services to Disabled or Automatic Delayed Start

  1. Pat Richard

    A little shorter code the foreach:
    Get-Service | Where-Object {$_.displayname -match “Skype*|Lync*”}| ForEach-Object {& “$env:windir\system32\sc.exe” failure $($_.name) start=delayed-auto}

Comments are closed.