I’ve seen in my blog stats that visitors are much interested in "Extending ADUC for remote management" articles, thus it’s time to give you another ADUC extension that I think you will really appreciate a lot.
Supporting users by remote controlling their desktop is one of the most recurring activities in any corporate environment, ranging from small shops to large organizations.
There’s a plethora of products that offer remote control capability:
- provided as part of Enterprise-class System Management suites (Landesk, SCCM, Altiris, etc..) mainly tailored to large orgs
- provided as stand-alone product (pcAnywhere, Dameware, UltraVNC/RealVNC, etc..)
- a 3rd no-longer-emerging category of web-based remote control tools that differ from the above two categories because they don’t need an agent/service listening on the server (the "target" computer that shares the screen), that’s the reason why they are also referred as "agent-less".
They are flexible, as a tiny software is downloaded by the user on-demand from a web link (URL) provided by the "helper", and they are firewall-friendly, as the connection is initiated by the user’s computer and the traffic goes over http/https through a connection broker that is maintained on the Internet by the service provider.
I said the category is no-longer-emerging because since two big IT players acquired the two leading web-remote-control companies – Cisco acquired WebEx in 2007 (WebEx Support Center) and Citrix acquired Expert City in 2004 (GoToAssist) – I believe that market can be considered mature and strategic.
OK, sorry for digression about remote control tools… none of the above mentioned products will be discussed today! :-)
If you come from Windows NT days you know that Microsoft had been always "stingy" with remote control tools in the past, that’s the reason why pcAnywhere became so popular in 90′s, but got almost obsolete since Microsoft introduced "Terminal Services Remote Administration Mode" in Windows 2000 Server to remotely control servers and later introduced "Remote Desktop/Remote Assistance" with Windows XP Professional to remotely control clients.
Both tools rely on RDP (Remote Desktop Protocol, based on ITU T.120 family of protocols) that was initially released as version 4.0 with Windows NT4.0 Terminal Server Edition and later introduced as:
- RDP 5.0 with Windows 2000 Server
- RDP 5.1 with Windows XP Professional
- RDP 5.2 with Windows Server 2003
- RDP 6.0 with Windows Vista
- RDP 6.1 with Windows Server 2008
NOTE: AFAIK Netmeeting in "Remote Desktop Sharing" mode was the only remote control option given by Microsoft in the NT4 era.
OK, sorry again for digression about RDP History…. I won’t digress any longer in this post about the Windows "terminal world", but be sure to know the difference between Remote Desktop and Remote Assistance on a computer running Windows later than version 2000:
- Remote Desktop allows a user to remotely control a computer desktop by authenticating and running his own session (the current logged user is forcibly logged out when the remote user logs-in on a Windows XP computer. Windows Server 2003 allows two concurrent connections that can also be “shadowed”)
- Remote Assistance allows an "helper" to remotely get control of the user desktop without terminating the user current session, so that the user can show the problem to the helper and get the issue fixed.
I was one of those who believed Remote Assistance could be asked ("solicited") by the user only and only through the Wizard in the Help and Support Center (Invite a friend to connect to your computer with Remote Assistance) that creates a Remote Assistance invitation file that the user could send by email or IM (see KB300546 and KB300692)…. not very practical for a number of reasons, such as the asynchronous establishment of the connection.
I was totally unaware that Remote Assistance could be "offered" by the helper as well! (thank you Antonio for telling me that!), this capability is called “Unsolicited Remote Assistance” and works as follow:
- Open the "Help And Support Center" in Windows XP and click on "Use Tools to view your computer information and diagnose problems"
NOTE: in Vista it’s under All Programs – Maintenance – Windows Remote Assistance

- click "Offer Remote Assistance" under the left Tools pane

- type the machine IP address or Host Name of the computer whose owner requires assistance (aka the “Novice” in RA jargon)

NOTE : administrative privileges won’t suffice, you need to setup the "Offer Remote Assistance" GPO setting under
Computer Configuration/Administrative Templates/System/Remote Assistance (see KB301527 for more info).
Replace DOMAIN\DesktopSupportTeam as seen in the picture below with your AD NETBIOS domain and AD security group created for people allowed to control users’ remote PC. Yes, you got it right, it works in Domain mode only!
NOTE: Remote Assistance uses DCOM, useless to say that DCOM needs to be enabled in the registry (enabled by default):[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole]"
EnableDCOM"="Y"
NOTE: of course Windows Firewall (or any 3rd party firewall software) has to be configured to allow Remote Assistance traffic (see KB555179 and KB884910).
At this point on the “Novice” screen a message will pop up prompting the “Novice” to allow the “Expert” (the one who is giving support in RA jargon) to remotely control the computer by taking the current session.
NOTE: there are some tricks to override the Remote Assistance prompt and automatically take control of user session, but I strongly disencourage this behaviour, it does not respect the user privacy and most likely it is not allowed by the corporate policy.
When I saw the “Unsolicited Remote Assistance” working for the first time, I was pretty amazed, BUT I did not find it quick enough opening the "Help And Support Center" and clicking two links.. (you know I am lazy…!).
Fortunately I found JSI Tip 8047 explaining how to start "Offer Remote Assistance" from the command line (single line, wrapped for reading):
"%ProgramFiles%\Internet Explorer\iexplore"
hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/Unsolicitedrcui.htm
That worked on a Windows XP box, but I suddenly thought about adding some kind of automatism…
…I wondered "Why not populating the computer name field by pulling the info from ADUC??".
Display Specifiers are our friends again here! So let’s add “Offer Remote Assistance” context menu as explained in my previous posts Extending ADUC for remote management (part 1 – introduction) and Extending ADUC for remote management (part 2 – Remote Desktop).
- run ADSIEDIT.MSC and browse the configuration partition at cn=409,cn=DisplaySpecifiers, cn=Configuration,<ForestRootDN> (Enterprise Admins privileges are required)
- right click on “CN=computer-Display” and select “Properties”, then open the AdminContextMenu multi valued string attribute
- add the following string: “3,&Offer Remote Assistance,OfferRA.vbs” as shown in the picture NOTE: “3” is just a sequential number incremented by +1 over the last menu item. For instance, if you have only one string, use “2” as order number:
“2,&Offer Remote Assistance,OfferRA.vbs”.
-
Wait for replication, now you will see the new menu time within ADUC (right click on a computer object).
OK now we need a piece of code that sends the computer name from ADUC to the Offer Remote Assistance connection box.
Because, as I said in my previous posts, the computer name is passed as an argument by ADUC console in LDAP format (DN), I had to convert the machine Distinguished Name into DNS host name.
It was pretty easy to create a Visual Basic Script that queries AD for machine object DN and retrieves its dNSHostName attribute.
Now that we have the machine host name we can run the “Offer Remote Assistance” connection box and pass the machine host name as keystrokes.
' OfferRA.vbs (c) Gabriele Scolaro
' Feb 2009. This script is invoked by a context menu in ADUC (displaySpecifier)
' ADUC passes the full LDAP path as argument, the scripts retrieves the object DNS name,
' execute remote assistance GUI, write the DNS hostname and ALT-C + ALT-S
' Tested with Windows XP SP3 ENGLISH
set shell = createobject("wscript.shell")
dim strComputerName
' store the argument to strLDAPHost
strLDAPHost=WScript.Arguments.Item(0)
' retrieve dnshostname from full LDAP path
Set objSysInfo = CreateObject("ADSystemInfo")
Set objComputer = GetObject(strLDAPHost)
strComputerName = objComputer.dnsHostName
' execute Offer Remote Assisance box
shell.run "hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/Unsolicitedrcui.htm"
' Activate the Help and Support Center window and send the dnsHostName as Keystrokes + ALT-C (Connect) and ALT-S (Start)
shell.AppActivate("Help and Support Center")
wscript.sleep 3500
shell.sendkeys strComputerName
wscript.sleep 40
shell.sendkeys "%c"
wscript.sleep 20
shell.sendkeys "%s"
NOTE: copy the script to a folder that is included in the %path% system variable such as %windir% or %windir%System32
Now if you properly set Remote Assistance GPO and Firewall as explained above, you should be able to initiate (offer) a Remote Assistance by right clicking on a computer account and selecting “Offer Remote Assistance”…. nice eh? :-)
And if you believe this is not enough or it’s not very elegant… well, feel free to customize Remote Assistance as you like! http://msdn.microsoft.com/en-us/library/ms811079.aspx and don’t forget to publish your script!
Stay tuned, because I have other ideas to simplify your everyday IT life by adding new functionalities to your ADUC console!