Announcement

Collapse
No announcement yet.

Script for changing description of computer objects in domain

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

  • Script for changing description of computer objects in domain

    Hi,

    I just want to mention I dont have more idea about scripting, I am using Win2K3 domain controller & My query is I want to add different Descriptions for different & all computer objects in domain simultaniously,

    can anybody guide about the same.
    Regards

    SVB

    "Never expect things to happen..struggle and make them happen."

  • #2
    Re: Script for changing description of computer objects in domain

    Hi

    Just try the Technet script repository.

    http://www.microsoft.com/technet/scr....mspx?mfr=true

    This is the closest I've found that may help you.
    It will need a bit of tweaking to work, but it's worth giving it a go.

    Good luck
    Caesar's cipher - 3

    ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

    SFX JNRS FC U6 MNGR

    Comment


    • #3
      Re: Script for changing description of computer objects in domain

      There it is, I'll make it a bite easier for you.
      Give this one a go, but as i said b4 it will need a bit of tweaking.

      Code:
      On Error Resume Next
      
      Set objComputer = GetObject _
          ("LDAP://CN=atl-dc-01,CN=Computers,DC=fabrikam,DC=com")
      
      objProperty = objComputer.Get("Location")
      If IsNull(objProperty) Then
          Wscript.Echo "The location has not been set."
      Else
          Wscript.Echo "Location: " & objProperty
          objProperty = Null
      End If
      
      objProperty = objComputer.Get("Description")
      If IsNull(objProperty) Then
          Wscript.Echo "The description has not been set."
      Else
          Wscript.Echo "Description: " & objProperty
          objProperty = Null
      End If
      Edit by Dumber:
      Wrapped code tags on the script.
      Last edited by Dumber; 26th February 2007, 12:22.
      Caesar's cipher - 3

      ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

      SFX JNRS FC U6 MNGR

      Comment

      Working...
      X