Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


newbie here, take it easy please

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,57358
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> newbie here, take it easy please
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 newbie here, take it easy please - 3/3/2008 8:43:24 AM   
  duhaas

 

Posts: 9
Score: 0
Joined: 3/3/2008
Status: offline
I have the following:

Set objGroup = GetObject("LDAP://CN=Trust File Server Migrate,OU=Groups,OU=IMC,OU=Trust,OU=Corp,DC=Mi,DC=Micorp,DC=com")
For Each objUser in objGroup.Member
objUser.Put "homeDirectory", "\\mi-mke-mcfile02\users\%username%"
objUser.SetInfo
next

What I am trying to do is to change the homedirectory path of all the users in a given group.  The problem is I dont seem to either have the right syntax or a clue.  Any help you can provide I would apprecaite.  I got the idea for my script based on two other scripts I had seen online.
 
 
Post #: 1
 
 RE: newbie here, take it easy please - 3/3/2008 8:58:10 AM   
  ebgreen


Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
Do you get any errors? Is this your entire script? Do you have the rights to change the homedir?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to duhaas)
 
 
Post #: 2
 
 RE: newbie here, take it easy please - 3/3/2008 9:00:06 AM   
  duhaas

 

Posts: 9
Score: 0
Joined: 3/3/2008
Status: offline
I do have rights to change the homedir, I get an error that says

line 3, char 2, error: object required 'objuser'

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: newbie here, take it easy please - 3/3/2008 9:03:16 AM   
  ebgreen


Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
Try:

For Each objUser in objGroup.Members

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to duhaas)
 
 
Post #: 4
 
 RE: newbie here, take it easy please - 3/4/2008 1:09:17 AM   
  duhaas

 

Posts: 9
Score: 0
Joined: 3/3/2008
Status: offline
that was it, i appreciate your help.  although now I am realizing that setting it to %username% doesnt work well since it actually sticks in %username% instead of the username of the actual user.  sounds like i need to user the samaccountusername????

(in reply to ebgreen)
 
 
Post #: 5
 
 RE: newbie here, take it easy please - 3/4/2008 1:27:29 AM   
  ebgreen


Posts: 4972
Score: 31
Joined: 7/12/2005
Status: offline
%username% is an environment variable which if it did resolve (it won't resolve as it is currently used) would resolve to your username if you are running the script. It might be entertaining to have everyone's homedir point to the same folder but I doubt everyone would appreciate the humor.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to duhaas)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> newbie here, take it easy please Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts