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?

有帮助吗?

解决方案

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

ntrights +r SeBatchLogon -u mydomain\batchuser
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top