Users in Group, modify profile path/delete defined UNC
 




IT Certification FAQ

 
|
Home
|
Microsoft
|
CISCO
|
CompTIA
|
Exam/Study FAQ
|
Employment FAQ
| Links  | Forums  |
Book Reviews


FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  ProfileProfile  Log in to check your private messagesPrivate messages  Log inLog in

Users in Group, modify profile path/delete defined UNC

 
Post new topic   Reply to topic    Forum Index -> microsoft.public.windows.server.active_directory
Author Message
Paul J
Guest





PostPosted: Wed Aug 22, 2007 2:01 am    Post subject: Users in Group, modify profile path/delete defined UNC Reply with quote

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





PostPosted: Fri Aug 31, 2007 12:29 am    Post subject: Re: Users in Group, modify profile path/delete defined UNC Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> microsoft.public.windows.server.active_directory All times are GMT
Page 1 of 1

 

Copyright © 2002-2006 Web-S-Sense Pty. Ltd. All rights reserved.

Powered by phpBB
Advertising | Policies/Disclaimers | Contact us | Link to us


Featured Sites: Free Antivirus and Antispyware Info | Free PC Support | MCSE Directory