views:

2879

answers:

2

I am trying to create a powershell script to automate user creation which is working great using ADSI. However I need to set the following properties and I am not sure how (or if ADSI can even do this):

  • Log on as a service
  • Allow logon locally

Any ideas how to do this?

+1  A: 
Rihan Meij
+2  A: 

The solution to working with GPO's in PowerShell is via a COM+ object called GPMgmt.GPM which is part of the Group Policy Management Console feature. The best article for information I could find on this is: http://technet.microsoft.com/en-us/magazine/cc162355.aspx

I have yet to be able to figure out how to set those specific values though.

Robert MacLean