Local Security Policies scripting RRS feed

  • Question

  • Hi all,


    I was wondering if anyone knew of a way to script a modification to a local security policy. Basically what I want to do is add a local group to seBatchLogonRights to a list of PCs on a domain. I realize you can use a GP to do this in a domain, but the way we have our AD setup it wouldn't work unless I were to do this on all PCs, and to be honest I don't want to do that. I know about NTRights, but I would prefer not to have to copy that to every PC and run the script then remove it.

    So basically what I want to do is run script that would preferably be something to the effect of





    localsecurityedit /machine var1 /add var2 seBatchlongonRight


    I mean this will probably be more complicated, but a simplified mapping of what I'd like to do. Go through  list of machines and add the selected user to the logon as batch job security policy. Any ideas and help would be appreciated thanks.

    Friday, July 8, 2011 3:04 PM