Quote:
Can you not get this from the registry:
Yes, as is the case with 85% of the macros.
Quote:
Why would you pick on one attribute of the object and present it as a macro?
Because this is the only AD attribute that I know of that is duplicative to the workstation. I've started populating this field as such [ASSET_TAG] : [BUILDING] : [ROOM#] : [POC] : [DESC]
In AD I can see all of the info in ADUC. I want to replicate it (maybe once monthly) to the workstation so my asset mgmt software can pull it from the local machine w/o inflicting more network overhead and also not have to be attached to the network. Also I can call a user and easily request this info or look it up on their PC in the field. There's a lot of potential including a large potential source of confusion b/c the field are duplicative.
Quote:
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
Again, as is the case with most macros. They're there b/c they make writing code easier. Surely, it's easier to type @ADDesc. And BTW, to make a point, you neglected to Dim $objsys and to include all of the error checking code that would normally follow. 
Quote:
Quote:
Not sure of M$ logic of not syncronizing these when a computer is part of a domain.
Yup, it's a puzzler.
Once you commit to using these fields I think you'll find the desire to keep them in concert. I'd rather not invoke the AD object (unless I had to do a .put_) as I imagine the workstation data should reflect the AD data which would be set by WriteValue on the client as you suggest above.
Granted, this is starting to smell like a UDF but the macro would make it easier to get at the data in all cases. Can someone comment on the local system and network overhead of a macro vs. CreateObject? (Assume 10,000 clients)
Regardless, it's still a hell of a lot easier to:
Code:
If @ADDesc AND @ADDesc<>@Desc
WriteValue(...
_________________________
-Jim
...the sort of general malaise that only the genius possess and the insane lament.