Disable Windows Server 2016 Services – Powershell

With cybersecurity being a hot topic throughout media, business, and IT worlds, I thought that Microsoft would have strengthened their efforts to de-bloat the Windows Server 2016 family, but that doesn’t seem to be the case.

This article is going to take a look at some of the system services found in Microsoft Windows Server 2016 and how the unneeded ones can be disable with Powershell.

Is this a Windows 10 Tablet?

A quick review of the Windows Server 2016 services might have you thinking Microsoft just copy-and-pasted source code for Windows 10 and renamed it to “Yay, server!” You’ll start seeing services that just don’t make sense for a server OS:

BlueTooth  Support
GeoLocation
Sensor Monitoring Service
Touch Keyboard and Handwriting Panel Service
Wallet Service
Windows Camera Frame Server

Windows Mobile Hotspot
XBox Live Auth Manager
XBox Live Game Save

Now who doesn’t want to game on a blade with 58 CPU cores and 512GB of ram? Am-I-right?!

Microsoft does have a great article which covers every built-in Windows Server 2016 service,  and whether it is recommended, “okay”, or prohibited to disable. If a service isn’t addressed here, please check out “Disabling System Services on Windows Server 2016.”

Use Windows Core?

Yes, I’m sure a lot of people would say “Well… if you’re that worried about it, use Windows Core!

True true, there’s other slim options out there, but let’s assume you already have a bunch of servers using Desktop Experience, or not all of your admins are very comfortable with command line. One way or another, there’s going to be Windows 2016 servers out there which will have these optional services.

Powershell Script

Forewarning, I do not claim that all services listed are absolutely unneeded; please review services specified and use judgement based on your environment. Also, you can check out “Disabling System Services on Windows Server 2016.”

This script is going help disable some of these services quickly, so you will have more time to “harden” a server based on its role. Not only will there be less vulnerabilities, but hopefully less to run, leading to (hopefull)y better performance.

Download the PS1

The console will receive the output for every action:

Console output for disabling Windows Server 2016 services

Disable Windows Server 2016 Services with powershell

Log output

Log output of disabled services

Leave a Reply

Your email address will not be published.