Implementing Remote Assistance into context menu of ADUC
Couple days ago I wrote about Remote Assistance. I wanted to make this feature as close as possible to administrators so I decided to implement special item in context menu of ADUC. Let’s do it.
We need to prepare script first. I wrote very simple one:
‘ Script to run Remote Assitance on domain computer
Set wshArguments = WScript.Arguments
Set objUser = GetObject(wshArguments(0))
‘ Check if Remote Assistance is installed
Set fso = CreateObject(“Scripting.FileSystemObject”)
If (fso.FileExists(“C:WindowsSystem32msra.exe”)) Then
’ Is istalled
Set objShell = WScript.CreateObject(“WScript.Shell”)
Return = objShell.Run(“C:WindowsSystem32msra.exe /offerra ” & objUser.dNsHostName, 1, true)
’ Is not installed, error.
Wscript.Echo “Microsoft Remote Assistance is not installed on this machine.”
Let’s save this script as .vbs file into \DOMAIN.LOCALNETLOGON directory. Now when we have a script, we need to create context menu in ADUC. This can be accomplished using ADSI Edit tool. Start ADSI Edit tool and look for CN=409,CN=DisplaySpecifiers,CN=Configuration,DC=domain,DC=local. There look for CN=computer-Display. Right-click on CN=computer-Display and select Properties.
In attribute adminContextMenu add following line:
2, &Remote Assistance,\domain.localNETLOGONRemoteAssistance.vbs
2 – order number
&Remote Assistance – name of the item in context menu
\domain.localNETLOGONRemoteAssistance.vbs – command to run
When you click OK, OK in ADSI Edit your work is done. Now when you click on computer account you can see and use following context menu item:
And that’s all folks.