# Example: Grant "Log on as a service" using WMI $Account = "DOMAIN\ServiceAccount" $Privilege = "SeServiceLogonRight"
Microsoft began deprecating ntrights.exe after Windows Server 2003. It is included in any standard Windows distribution after Windows 7/Server 2008 R2. Microsoft explicitly advises against downloading it from third-party sources. ntrights exe
: The user or group to change. Use " quotation marks for names containing spaces, e.g., "Domain Users" . -m \\Computer : (Optional) The remote computer to target. # Example: Grant "Log on as a service"
You must open the Command Prompt as an Administrator to modify local policies. : The user or group to change
Changes made with ntrights.exe are applied immediately. However, some logon rights may not take effect until the user logs out and logs back in.
ntrights -m \\SRV-01 -u "LocalAdminGroup" +r SeRemoteInteractiveLogonRight
On Windows 10/Server 2019 and later, you can often use the SecurityPolicy module or WMI wrappers, though ntrights remains simpler for single tasks.