Link to home
Start Free TrialLog in
Avatar of eMarketer75
eMarketer75

asked on

Managed connection to Remote Desktop Server with powershell

I have a remote desktop farm with 6 RD hosts that are running Windows Server 2012. I want to allow and disallow new connection to each server using PowerShell. I found the powershell command that is suppose to do the job, but it does not work.  When I verify in the Server Manager I still see the host server allowing new connections.

Command:
Set-RDSessionHost -SessionHost "RDHost1.domain.local" -NewConnectionAllowed "No" -ConnectionBroker "rdcb.domain.local"

I'm I doing something wrong? I tried running the command from the  RD Broker and host.
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

-NewConnectionAllowed $false   not -NewConnectionAllowed "NO"
I have been wondering about the same, but the help tells different. "No" is valid.
ASKER CERTIFIED SOLUTION
Avatar of eMarketer75
eMarketer75

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial