Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Change impact scope to one ou user

$
0
0

Dear Expert,

Here a VB script to query and set user AD attribute to "control access through..", but it's only for one user, I want to do the same action for bulks of users in one AD OU, how can I change it?

=========================

Const ADS_PROPERTY_CLEAR = 1

DIM objUser
'<<<< Bind to the user object using the distinguished name >>>>
set objUser = GetObject("LDAP://ou=it001,OU=it,OU=Companies,DC=domain,DC=net")

' Control access through remote access policy
objUser.PutEx ADS_PROPERTY_CLEAR, "msNPAllowDialIn", null
objUser.setinfo 'Save Changes
wscript.echo "Setting changed to 'Control access through remote access policy'"

Many Many Thanks in advance.


Viewing all articles
Browse latest Browse all 15028

Trending Articles