How can I get the Computer Account description from the AD using VBscript?

AH

Re: Computer Accounts Descripton by Torgeir

Torgeir
Fri Jul 16 11:25:30 CDT 2004

Alex H wrote:

> How can I get the Computer Account description from
> the AD using VBscript?
Hi

An example for current computer:

Set objSysInfo = CreateObject("ADSystemInfo")
strComputerDN = objSysInfo.ComputerName
Set objComputer = GetObject("LDAP://" & strComputerDN)
strDescription = objComputer.Description
WScript.Echo strDescription



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/community/scriptcenter/default.mspx

Re: Computer Accounts Descripton by Alex

Alex
Fri Jul 16 13:48:53 CDT 2004

Thanks, this helps


"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:Ok2guG1aEHA.4048@TK2MSFTNGP10.phx.gbl...
> Alex H wrote:
>
> > How can I get the Computer Account description from
> > the AD using VBscript?
> Hi
>
> An example for current computer:
>
> Set objSysInfo = CreateObject("ADSystemInfo")
> strComputerDN = objSysInfo.ComputerName
> Set objComputer = GetObject("LDAP://" & strComputerDN)
> strDescription = objComputer.Description
> WScript.Echo strDescription
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/community/scriptcenter/default.mspx