PowerShell script to add account to "Allow Logon Locally" privilege

PowerShell script to add an account to the "Allow Logon Locally" privilege on a local server in the Local Security Policy.

4.2 Star
8,220 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
  • How can i edit script for Deny locally logon user ?
    1 Posts | Last post February 22, 2017
    • I want stop specific user to logon locally.Please suggest on this.
  • how to modify your scrip to add users to followings
    1 Posts | Last post August 30, 2016
    • Act as part of the Operating System	SeTcbPrivilege 	
      Bypass Traverse Checking		SeChangeNotifyPrivilege	
      Lock Pages in Memory			SeLockMemoryPrivilege	
      Log on as a Batch Job			SeBatchLogonRight		
      Log on as a Service			SeServiceLogonRight	
      Perform Volume Maintenance Tasks	SeManageVolumePrivilege	
      Replace a Process Level Token		SeAssignPrimaryTokenPrivilege
      Please Suggest.i want one script to do all in one go.
  • Can you use the script to add a group
    1 Posts | Last post November 20, 2013
    • by changing the script parameter accouttoadd = domain\groupname, is it possible to add a group to the 'allow logon locally' in local policy ?
  • How we can add list of users account on list of computers
    2 Posts | Last post January 07, 2013
    • This script will add single user on single machine.If i want to add  the 100 numbers of users in 100 numbers of machines(single user,single machine)
    • hi sanjay!
      You could do this by using PowerShell Remoting (http://blogs.msdn.com/b/powershell/archive/2008/05/10/remoting-with-powershell-quickstart.aspx) You need to publish the script file on a Network share or copy it to each server. then you execute the script remotely by using "invoke-command". Therefore PowerShell Remoting must be set up. 
      Or you create a startup script by using a group policy. this could be configured just to apply to SharePoint Servers. 
      Does this help you?