Announcement

Collapse
No announcement yet.

Alter Computer Descriptions via WMI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Alter Computer Descriptions via WMI

    So, I'm looking for a way to modify the "Computer Description" field on all the machines on our domain. I know you can use variables like %E% in customer tools and whatnot, but what I'm looking to do is this:

    Change the "Computer Description" field on all domain PCs to "'PC Make' 'PC Model' - 'Serial Number' - 'System RAM'"

    Obviously I'll need to Query WMI for these to automate it, and I understand I'll need the enterprise version in order to query any WMI aside from Win32_Process, But I'd like to prove that this is possible as a proof of concept to present to our management as a reason to upgrade.

    PC Make can be obtained from "Win32_ComputerSystem" in the "Manufacturer" Key
    PC Model can be obtained from "Win32_ComputerSystem" in the "Model" Key
    Serial Number can be obtained from "Win32_ComputerSystem" in the "Name" key
    System RAM can be obtained from "Win32_ComputerSystem" in the "TotalPhysicalMemory" Key

    Is there any way to do this? I'm even totally Okay If there was a way to do it without WMI.

  • #2
    By "Computer Description" you're referring to the Active Directory 'Description' attribute, correct? If so, as long as you have Hyena v11, you could do this in two steps:

    1. Run your WMI query and copy the results into an Excel spreadsheet.
    2. Modify you input file to work with the new Active Task feature in Hyena and let Active Task import the data into AD for you.

    I set this up and ran a quick test just now, if you would like me to send you the details on how I did it send an email to [email protected] and I'll send them to you.

    Comment


    • #3
      Thanks for the quick reply, Chuck!

      I suppose that will work as well. I was hoping to find a way to populate the Description field on the individual PCs (Computer Properties, General Tab, Comment in Hyena). I'm sure i can script a way for the PCs to pull the description field from AD and deploy it via GPO, but i was thinking i could cut out a step and do it directly. Is there a way to do that?

      Comment


      • #4
        This may be better suited for using a scripted solution of some sort. The computer comment field looks to be in the registry under the srvcomment field here: HKLM\SYSTEM\CurrentControlSet\Services\LanmanServe r\Parameters. You could take Hyena's WMI output and create a batch file using REG ADD, but it would take some massaging to accomplish. If you don't find a better solution email us and I'll see if I can help you put something together.

        Comment

        Working...
        X