We have a winner! You guys make me look so smart!
From: KenM [mailto:[email protected]]
Sent: Thursday, October 20, 2011 8:18 AM
To: NT System Admin Issues
Subject: Re: Script to fill in last user - ok real Q this time.
ok, then try this one then, just save as vbs like before.
Dim ad, objUser, objComputer
Set ad = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & ad.UserName)
Set objComputer = GetObject("LDAP://" & ad.ComputerName)
strMessage = objUser.Department & ", " & objUser.CN & ", " & Day(Now()) &
"/" & month(now()) & "/" & right(year(now()),2)
objComputer.Description = strMessage
objComputer.SetInfo
On Thu, Oct 20, 2011 at 11:04 AM, David Lum
<[email protected]<mailto:[email protected]>> wrote:
Uh...there's nothing further to that script, I just saved as .VBS and pointed a
GPO at it as a logon script. If I double-click on it it does nothing
discernible (I realize like a .CMD file it can do stuff while appearing not to).
From: KenM [mailto:[email protected]<mailto:[email protected]>]
Sent: Thursday, October 20, 2011 7:40 AM
To: NT System Admin Issues
Subject: Re: Script to fill in last user - ok real Q this time.
Have you tried to just run the script as a user?
Is there more to your script than you posted? what you posted is just a sub
routine and you are not calling it.
On Thu, Oct 20, 2011 at 10:29 AM, David Lum
<[email protected]<mailto:[email protected]>> wrote:
Hmm...how do I troubleshoot this? How can I confirm the script runs w/out
error? Surely this is easy and I'm simply overlooking the obvious.
From: Crawford, Scott
[mailto:[email protected]<mailto:[email protected]>]
Sent: Wednesday, October 19, 2011 2:56 PM
To: NT System Admin Issues
Subject: RE: Script to fill in last user - ok real Q this time.
You'll need to give uses the rights to modify that field on all computer
objects they might log into.
From: David Lum [mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Wednesday, October 19, 2011 4:01 PM
To: NT System Admin Issues
Subject: RE: Script to fill in last user - ok real Q this time.
OOOOOOOOOoooooooooooooohhhh nice, totally overlooked the GPO potential on this
bad boy.
From: KenM [mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Wednesday, October 19, 2011 1:59 PM
To: NT System Admin Issues
Subject: Re: Script to fill in last user - ok real Q this time.
How are you running this?
I would create a GPO and link to the OU you have the computers in. Under the
user config assign this as a login script and also enable loopback processing
for the GPO so it is applied to users.
On Wed, Oct 19, 2011 at 4:49 PM, David Lum
<[email protected]<mailto:[email protected]>> wrote:
OK I'll try not to keep answering these myself, is there a way to make this
apply to just a specific OU? I would like it to NOT run in my OU with servers
in it. Can I just change the LDAP:// references to look at a specific OU?
Sub DoADDescription
Dim ad, objUser, objComputer
Set ad = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & ad.UserName)
Set objComputer = GetObject("LDAP://" & ad.ComputerName)
strMessage = objUser.Department & ", " & objUser.CN & ", " & Day(Now()) &
"/" & month(now()) & "/" & right(year(now()),2)
objComputer.Description = strMessage
objComputer.SetInfo
End Sub
Dave
From: David Lum [mailto:[email protected]<mailto:[email protected]>]
Sent: Wednesday, October 19, 2011 1:44 PM
To: NT System Admin Issues
Subject: RE: Script to fill in last user
Of course I send this and then find it...thanks Mr. Hutchings! :)
Dave
From: David Lum [mailto:[email protected]]<mailto:[mailto:[email protected]]>
Sent: Wednesday, October 19, 2011 1:41 PM
To: NT System Admin Issues
Subject: Script to fill in last user
One of you guys has a VBS script to populate the "Description" field in AD with
the last logged in user but I have lost that little tidbit.....
David Lum
Systems Engineer // NWEATM
Office 503.548.5229<tel:503.548.5229> // Cell (voice/text)
503.267.9764<tel:503.267.9764>
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to
[email protected]<mailto:[email protected]>
with the body: unsubscribe ntsysadmin
~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
---
To manage subscriptions click here:
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin