Quantcast
Channel: Remote Desktop Services (Terminal Services) forum
Viewing all articles
Browse latest Browse all 1106

Remote powershell to Connection Brokers 2012R2

$
0
0

Good morning everyone!
Task is to get information about RDS status from remote machines.
Local poweshell on Connection Brokers works fine:

PS C:\> Import-Module RemoteDesktop
PS C:\> (Get-RDConnectionBrokerHighAvailability).ActiveManagementServer
ms-s-tscb02.sodrugestvo.local

But if we try to do this remotly it gives error:

PS C:\> New-PSSession -ComputerName ms-s-tscb02.sodrugestvo.local -Name RDS

 Id Name            ComputerName    State         ConfigurationName     Availability
 -- ----            ------------    -----         -----------------     ------------
 26 RDS             ms-s-tscb02.... Opened        Microsoft.PowerShell     Available


PS C:\>
PS C:\> Enter-PSSession -Name RDS
[ms-s-tscb02.sodrugestvo.local]: PS C:\Users\Administrator.SODRUGESTVO\Documents> cd \

[ms-s-tscb02.sodrugestvo.local]: PS C:\> Import-Module RemoteDesktop
[ms-s-tscb02.sodrugestvo.local]: PS C:\> (Get-RDConnectionBrokerHighAvailability).ActiveManagementServer
Get-RDConnectionBrokerHighAvailability : The RD Connection Broker server is not available. Verify that you can connect
to the RD Connection Broker server.
At line:1 char:2
+ (Get-RDConnectionBrokerHighAvailability).ActiveManagementServer
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-RDConnectionBrokerHighAvailability

Can someone give a tip or direction to look at?


Regards, Dmitriy Ilyin



Viewing all articles
Browse latest Browse all 1106

Trending Articles