Here's what I use for changing a computer description.
Set WshNetwork = WScript.CreateObject("WScript.Network")
strComputer = Wscript.Arguments.Item(0)
Set Obj= GetObject("winmgmts:\\" & strComputer).InstancesOf("Win32_OperatingSystem")
For Each x In Obj
choice = MsgBox("The current Description for " & strComputer & " is: " & x.Description & VbCrLf & VbCrLf & _
"Do you want to change the Description in AD?",4,"Change Description?")
If choice = 6 Then
strNew = Inputbox("What should the new Description be for " & strComputer & "?","Enter Description",x.description)
x.Description = strNew
x.Put_
MsgBox "The Description of " & strComputer & " is now: " & x.Description,0,strComputer & " - " & x.Description
End If
Next
WScript.Quit
It tells you what the description is currently (from Active Directory), and asks if you want to change it.
- If you say No, the script ends with no change.
- If you say Yes, it asks you for the new description and applies it to the computer description in AD. It then tells you what the description is after the change so you can verify that it changed.
I named the script
ChgDescFULL.vbs. (If you name it
ChgDesc.vbs, then the next time updates come through, it'll overwrite it with the old version. Or at least that's what seems to happen to me.)
The the action would look like this:
cscript {actionpath}ChgDescFULL.vbs {computer}I don't know about the Offer Remote Assistance.
Hope this helps.
Jono