Robert McCraw
Robert McCraw

Reputation: 673

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

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.

Upvotes: 1

Views: 1655

Answers (1)

Robert McCraw
Robert McCraw

Reputation: 673

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.

Upvotes: 2

Related Questions