Amending local user settings

Hello,

I am building a simple script to create a new local user, and then amend some of the settings in the profile. I am looking forward to find a way to disable “Enable remote control” in the Remote Control tab.

This is for Windows server in workgroup environment.

I am attaching a screenshot of the setting.

RemoteControl

What about setting for all users via GPO?

Registry Hive: HKEY_LOCAL_MACHINE
Registry Path: \SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\

Value Name: fAllowToGetHelp

Value Type: REG_DWORD
Value: 0

Or:

 Configure the policy value for Computer Configuration >> Administrative Templates >> System >> Remote Assistance >> "Configure Solicited Remote Assistance" to "Disabled".

Hello Tonyd,

Thank you for your suggestion. Unfortunately this option exist only when Active Directory is present, and I think it is about disabling this option - see the screenshot attached.
remoteassistance

I am looking for a way to disable this option in workgroup environment.

Thank you

Did you try the registry setting?

I found the solution. Here it is:

$ComputerName = $env:COMPUTERNAME
$UserName = “User1”

$UserObject = [ADSI]$ComputerObject=“WinNT://$ComputerName/$UserName”

#Look at current value
$UserObject.InvokeGet(“EnableRemoteControl”)

<# https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-ada2/25127d74-55c2-4a41-8cae-db4f4c0a0cb5
0: Disable
1: EnableInputNotify
2: EnableInputNoNotify
3: EnableNoInputNotify
4: EnableNoInputNoNotify
#>

#Set new value
$UserObject.InvokeSet(“EnableRemoteControl”,4)
$UserObject.SetInfo()

Thanks for sharing so others can benefit.