The following WMI code will get you the description information from a computer:

 

On Error Resume Next

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)

For Each objItem in colItems

    Wscript.Echo "Description: " & objItem.Description

Next

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stauffer, Christopher
Sent: Thursday, October 21, 2004 6:02 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] New to AD

 

I'm new to AD. Our network is Finally migrating to Active Directory 2000. (yeah I know 2003 is better but is isn't our call)

anyway during the migration when joining new Windows XP or Windows 2000 computers to the Windows 2000 domain, the computer name appears in Active Directory but the computer description that is on the computer does not show up in AD. Why does this happen? In network places I can see the computer description, but in AD it is just blank unless I manually add it. Is there a way to pull the computer description from the local box into AD when the computer joins the domain

 

I was told this by guys on another news group

 

Its two separate fields.

When you give a description to a computer object in AD users and computers, you are applying the description to the object, and not the computer itself.

 

When you logon to a workstation and add a description to it, you are adding the description to the machine itself, and not the object in AD. That is why you see the different behaviors. Unfortunately the 2 fields aren't tied together.

 

As for how to fix it, I think if a script ran that read the description from the local machine, and then connected to AD to update the computer object with the same name, you would be good to go.

 

So i guess my question is does anybody have a script that can do this.

 

Thanks,
 CHRIS STAUFFER   <><  
   Distributive Systems Specialist II
 Bureau of Information Technology

 
'  :   1(717)783-9049   ext 244
 
/[EMAIL PROTECTED]

 

 

<<image001.jpg>>

Reply via email to