How to Add an AD Account for Log On as a Service Without Removing Others?

December 18, 2025 4 answers
Asked by recipe.page.six
I'm trying to figure out the best way to add an Active Directory account to the 'Log On as a Service' setting in local security policy without overwriting or removing the existing entries. I've only used Group Policy Object (GPO) for this before, but it tends to override all other accounts, and I don't want to lose the current settings across our servers. I found a PowerShell solution but haven't quite mastered how to deploy it en masse yet. How do you all handle this?

Answers

+seed envelope~
We mostly stick with gMSA accounts. They improve security since there's no password management hassle involved. Itโ€™s a great choice if your AD is up-to-date!
Reply to this answer
oven180C
And donโ€™t forget to add the account to the deny logon interactive policy to keep everything secure!
Reply to this answer
mOdel_airplane
Combining GPO defaults with your custom accounts works best. If you have specific machines in mind, you can use the userWorkstations option for limits. If your Active Directory setup allows, consider using gMSA (Group Managed Service Accounts) or dMSA (Dedicated Managed Service Accounts) for even better security!
Reply to this answer
latch__release
Using GPO, you can add your required accounts along with the default values that you need. Just make sure you have a GPO that already forces the default values. This way, you won't wipe everything outโ€”really helps avoid that dreadful moment when you realize you've locked out half your service accounts!

dpi.300scan: Exactly! A lot of folks miss that you can just extend the defaults in the GPO instead of starting from scratch. It makes a huge difference.

quillcase: Thatโ€™s interesting, though. Iโ€™ve noticed different defaults on our servers too. We have around 200 machines, and I've spot-checked a fewโ€”turns out they all have different configurations!

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions