Can you not get this from the registry:
Code:
$sComputerDescription=ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters","srvcomment")
"Computer Description: '"+$sComputerDescription+"'"+@CRLF
IMO we are moving away from hard-coding access to this sort of information and towards using the standard providers. Why would you pick on one attribute of the object and present it as a macro?
The information is very easy to retrieve from the object, and using the standard providers means that future extensions will also be available.
For example, getting the computer description is as simple as:
Code:
$objSys = CreateObject("ADSystemInfo")
"Computer description='"+GetObject("LDAP://"+$objSys.ComputerName).Description+"'"+@CRLF
I don't think it is a terrible idea, just a bit inflexible and redundant when the data is readily available using existing functionality.