# Script to enable Remote Assistance on Windows devices

Remote Assistance on Windows devices enables remote technical assistance by providing an admin access to control the user’s computer over a network connection. With Remote Assistance, IT admins can resolve issues on Windows devices remotely. While the Remote Assistance option can be managed from the Settings app on Windows devices, admins can also use the scripts provided in the following document to carry it out remotely. Using Hexnode’s [Execute Custom Script](https://www.hexnode.com/mobile-device-management/help/executing-custom-scripts-for-windows/) action, you can deploy scripts to enable or disable Remote Assistance connections on Windows devices seamlessly.

 Disclaimer:The sample scripts provided below are adapted from third-party open-source sites.

 

Disable Remote Assistance 
--------------------------

Use the following scripts to disable Remote Assistance on Windows devices.

### PowerShell script

Set-ItemProperty -Path "HKLM:\\System\\CurrentControlSet\\Control\\Remote Assistance" -Name "fAllowToGetHelp" -Value 0 Write-Output "Remote Assistance is disabled." 

   1

2

  Set-ItemProperty -Path "HKLM:\\System\\CurrentControlSet\\Control\\Remote Assistance" -Name "fAllowToGetHelp" -Value 0

Write-Output "Remote Assistance is disabled." 

   

 

  

The PowerShell script uses the ***Set-ItemProperty*** cmdlet to modify the **fAllowToGetHelp** registry value within **HKLM:\\System\\CurrentControlSet\\Control\\Remote Assistance** to 0, disabling Remote Assistance on Windows devices.

### Batch script 

reg add "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Remote Assistance" /v fAllowToGetHelp /t REG\_DWORD /d 0 /f 

   1

  reg add "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Remote Assistance" /v fAllowToGetHelp /t REG\_DWORD /d 0 /f 

   

 

  

The Batch script uses the ***reg*** command to modify the ***fAllowToGetHelp*** registry value within **HKLM:\\System\\CurrentControlSet\\Control\\Remote Assistance** to 0. This disables the Remote Assistance on Windows devices.

Enable Remote Assistance
------------------------

To enable Remote Assistance on your Windows device, use the scripts mentioned below.

### PowerShell script

Set-ItemProperty -Path "HKLM:\\System\\CurrentControlSet\\Control\\Remote Assistance" -Name "fAllowToGetHelp" -Value 1 Write-Output "Remote Assistance is enabled." 

   1

2

  Set-ItemProperty -Path "HKLM:\\System\\CurrentControlSet\\Control\\Remote Assistance" -Name "fAllowToGetHelp" -Value 1

Write-Output "Remote Assistance is enabled." 

   

 

  

The above PowerShell script will set the **fAllowToGetHelp** registry value to 1 to enable Remote Assistance on Windows devices.

### Batch script 

reg add "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Remote Assistance" /v fAllowToGetHelp /t REG\_DWORD /d 1 /f 

   1

  reg add "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Remote Assistance" /v fAllowToGetHelp /t REG\_DWORD /d 1 /f 

   

 

  

The above batch script sets the **fAllowToGetHelp** registry value to 1 to enable Remote Assistance on Windows devices.

What happens at the device end? 
--------------------------------

The changes made with the use of the above scripts can be reflected within **Settings > About > Advanced system settings > Remote**. The option “**Allow Remote Assistance connections to this computer**” will be disabled/enabled upon the script execution. Nevertheless, users retain the ability to manually re-enable/disable Remote Assistance on the device.
![Execute script to enable or disable the Remote Assistance option on device](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2024/05/Enable-or-disable-Remote-Assistance-using-scripts.png "Enable or disable Remote Assistance using scripts")[](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2024/05/Enable-or-disable-Remote-Assistance-using-scripts.png)

 Notes:- It is recommended to manually validate the script execution on a system before executing the action in bulk.
- Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.