Question

I am using Windows Server 2008 R2. For a server joined onto a Windows 2008 R2 domain I want to grant SeBatchLogon privileges to an account, for example, I want the domain account 'mydomain\batchuser' to have batch logon privileges on the local Windows 2008R2 server so that I can run scheduled tasks under that logon. I can set the privileges through the Windows GUI, but how can I script this with Powershell?

Was it helpful?

Solution

Use ntrights.exe from the Windows Server 2003 Resource Kit Tools:

ntrights +r SeBatchLogon -u mydomain\batchuser
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top