Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PC Description W2K Pro

1 view
Skip to first unread message

Al

unread,
Feb 3, 2003, 1:24:28 PM2/3/03
to
How can I change the computername "description" of
machines using WMI. I have a locked down user environment
so it would have to be done with admin rights.

thanks

Richard Mueller

unread,
Feb 3, 2003, 9:46:08 PM2/3/03
to
Al wrote:

>.
>
Hi,

Computer description can be set with ADSI and VBScript.
WMI is not needed. The procedure is exactly the same for
user and computer objects. Technically, the "description"
attribute is multi-valued. The "proper" way is to use the
PutEx method, even though only one value is allowed.
Assuming sufficient rights:

Const ADS_PROPERTY_UPDATE = 2
Set oComputer = GetObject_
("LDAP://cn=MyComputer,cn=computers,dc=MyDomain,dc=com")
oComputer.PutEx ADS_PROPERTY_UPDATE, _
"description", Array("Admin Computer")

Richard

0 new messages