Powershell to give Domain User Logon As Service rights


hi,

i newbie powershell , windows administration stuff. wondering if there powershell script give domain user "logon service" rights in 1 of our servers. found people using carbon.dll achieving , ntrights utility.

i tried out using ntrights, appears need install it? trying in windows server 2008-2012 r2. not keen on installing ntrights module (if required), installing new not prefer.

is there powershell command such (or out-of-the-box in windows) can achieve requirement? need using command line, no gui stuff here.


admin quikview solution crm 2013

that's silly requirement. it's better use trusted microsoft utility try reinvent wheel yourself. however, can use embedded c# code, add-type cmdlet, , p/invoke accomplish same thing in powershell script no external dependencies. see http://www.pinvoke.net/default.aspx/advapi32.lsaaddaccountrights starting point.


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS