How to grant permissions in Local Security Policy like "Log on as a service" via script specifically in windows 10?

1.4k Views Asked by At

I've seen lots of posts about this for earlier versions of windows pointing towards RSAT and ntrights.exe but neither of those solutions work for Windows 10. I'm looking for a solution preferably in powershell or batch.

1

There are 1 best solutions below

0
Robert McCraw On

Alrighty, I figured it out. I ended up having to use Carbon. After running:

.\Carbon\Import-Carbon.ps1

I was able to successfully run:

Grant-Privilege -Identity $username -Privilege SeServiceLogonRight

Something to note is that the Local Security Policy manager doesn't have a refresh button. You'll have to close and reopen the tool in order to see external changes to the policy.