How to enable Remote Assistance and add an exception for it in Windows Firewall from the command line?
To allow remote assistance in firewall:
netsh advfirewall firewall set rule group="remote assistance" new enable=Yes
For adding/editing a registry key:
reg add "HKLM\System\CurrentControlSet\Control\Remote Assistance" /v fAllowToGetHelp /t REG_DWORD /d 1 /f
Related videos on Youtube
Phoenix Logan
Updated on September 18, 2022Comments
-
Phoenix Logan over 1 year
I need to enable Remote Assistance from the command line. The equivalent of checking this box and hitting Apply.
This is for automation and I tried editing the registry entry
HKLM\System\CurrentControlSet\Control\Remote Assistance\fAllowToGetHelp
but the troubleshooter comes up and needs it to allow it through the firewall.This page says how to allow ports through the firewall, but not how to add applications, and I see here that the firewall settings vary depending on the network type. How can I automate this like the check box, which just figures everything out automatically?
When the message comes up saying
This computer is not set up for invitations
, I can click Repair. When I do this, the troubleshooter automatically fixes everything, but it is visible and requires me to close it manually when it's finished. It'smsdt.exe
, but I'm not sure how to use it from the command line. I used Process Explorer to see whatmsra.exe
was doing, but the answer file (which tells the troubleshooter what answers to use for questions it asks) it passed to the troubleshooter was deleted by the time I tried to open it. Also, I need themsdt.exe
to automatically close.I've been searching for hours but could not find anything helpful.
-
Ƭᴇcʜιᴇ007 almost 10 yearsUse policies (gpedit.msc).
-
Phoenix Logan almost 10 yearsI can't, because I am automating it (not on corporate computers). It's for an application that automatically sets up Remote Assistance, but it has to enable it first. It sets up the password and securely sends the invitation file. I need to do it from the command line, and gpedit.msc is not supported unless you're on a Pro installation of Windows.
-
-
Ƭᴇcʜιᴇ007 almost 10 years"Remote Desktop" is not the same as "Remote Assistance".
-
Phoenix Logan almost 10 yearsI'll see if this works. That's brilliant!
-
Phoenix Logan almost 10 yearsWorks great! The checkbox is even checked now.
-
redrage about 4 yearssorry for the necro, but just got back on here from .. years. Thank you for the correction!