|
|
FAQ
Search
Memberlist
Usergroups
Register
Profile
Private messages
Log in
|
|
| Author |
Message |
Paul J Guest
|
Posted: Wed Aug 22, 2007 2:01 am Post subject: Users in Group, modify profile path/delete defined UNC |
|
|
I have a bunch of users that are members of an AD global group.
Each AD user account in the group has a profile path set for the account
(roaming profile).
Does anyone know how to remove/clear the profile path for users by targeting
the group they belong to? Script, other?
PJ |
|
| Back to top |
|
 |
|
|
Paul J Guest
|
Posted: Fri Aug 31, 2007 12:29 am Post subject: Re: Users in Group, modify profile path/delete defined UNC |
|
|
Just what I was looking for, thanks Rich!
"Richard Mueller [MVP]" wrote:
| Quote: | Paul J wrote:
I have a bunch of users that are members of an AD global group.
Each AD user account in the group has a profile path set for the account
(roaming profile).
Does anyone know how to remove/clear the profile path for users by
targeting
the group they belong to? Script, other?
In a VBScript you can bind to the group object, enumerate the direct members
of the group, and for each member use the PutEx method to clear the
profilePath attribute. For example:
============
Const ADS_PROPERTY_CLEAR = 1
' Bind to group object with Distinguished Name of the group.
Set objGroup = GetObject("LDAP://cn=TestGroup,ou=West,dc=MyDomain,dc=com")
' Enumerate the direct members of the group.
For Each objMember In objGroup.Members
' Clear the profilePath attribute.
objMember.PutEx ADS_PROPERTY_CLEAR, "profilePath", 0
objMember.SetInfo
Next
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
|
|
|
| Back to top |
|
 |
|
|