Re: VBScript to update Computer Description with username and department
From: Steve Seguis [MVP] (steve_NO_SPAM_at_scriptmation.com)
Date: 01/28/05
- Next message: Steve Seguis [MVP]: "Re: VBScript to update Computer Description with username and department"
- Previous message: emebohw_at_netscape.net: "Re: is it possible to read "volatile environment" regkey in HMCU?"
- In reply to: Lexxus: "Re: VBScript to update Computer Description with username and department"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 28 Jan 2005 23:24:05 GMT
Thiscomp essentially holds a reference to the computer object in
ActiveDirectory whereas oUser is a reference to the user object. As far as
books are concerned, I like the "Windows 2000 Scripting Guide" from
Microsoft Press.
-- Steve Seguis - MCSE, MVP Windows Server, SCJP SCRIPTMATION Automating the Enterprise http://www.scriptmation.com "Lexxus" <JBDanford2002@yahoo.com> wrote in message news:1106923633.154387.4030@z14g2000cwz.googlegroups.com... > Thanks Steve that worked out great. This is what I finally came up > with. > Dim adsinfo,nw > Set adsinfo = CreateObject("adsysteminfo") > > Set ThisComp = GetObject("LDAP://" & adsinfo.ComputerName) > Set oUser = GetObject("LDAP://" & adsinfo.UserName) > wscript.echo oUser.department & " - " & ouser.description & " " & > oUser.cn & " " & Ouser.telephonenumber > Thiscomp.put "description", oUser.department & " - " & > ouser.description & " " & oUser.cn & " " & Ouser.telephonenumber > ThisComp.Setinfo > > The problem with what you gave me was it was writing the path to the > the use from Active Directory. > > Although through your post I better understand how to pull the info I > wanted. Do you know of any good books to get for VBScript? or at least > for doing this kind of stuff. What does the Thiscomp. do? Is that a > library of commands? >
- Next message: Steve Seguis [MVP]: "Re: VBScript to update Computer Description with username and department"
- Previous message: emebohw_at_netscape.net: "Re: is it possible to read "volatile environment" regkey in HMCU?"
- In reply to: Lexxus: "Re: VBScript to update Computer Description with username and department"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|