Scenario / Questions
I am running the following command from a PowerShell console on a Windows 8 machine, trying to configure a Server 2012 R2 RDS Connection Broker:
Import-Module RemoteDesktop Set-RDSessionCollectionConfiguration -CollectionName "Example" -CustomRdpProperty "gatewayhostname:s:rdp.example.com" -ConnectionBroker "ep-ts01.ad.example.com"
However, even though I am specifying which Connection Broker to use, it always tries to connect to
New-PSSession : [localhost] Connecting to remote server localhost
failed with the following error message : The clie cannot connect to
the destination specified in the request. Verify that the service on
the destination is running an is accepting requests. Consult the logs
and documentation for the WS-Management service running on the
destination, most commonly IIS or WinRM. If the destination is the
WinRM service, run the following command on the destination to analyze
and configure the WinRM service: “winrm quickconfig”. For more
information, see the about_Remote_Troubleshooting Help topic.
Get-RDSessionCollection -ConnectionBroker ep-ts01.ad.example.com works just fine and returns the collections.
It’s the same story if I do
Enter-PSSession ep-ts01.ad.example.com and run it from there. However if I run the command from the server itself (i.e. not remotely) it works just fine.
How can I fix this?
Find below all possible solutions or suggestions for the above questions..
Mark, I had a lot of fun tracking this down for you. I can totally see where your line of thought is, but you’re asking the wrong question. The question should be “Why can’t I establish a ‘servermanagerworkflows’ session on my machine?”
If you look in the
$enf:systemroot\system32\WindowsPowerShell\v1.0\Modules\RemoteDesktop and open the
SessionCollectionProperties.psm1 module and jump to line 383 there’s an entry where Microsoft is intentionally trying to create a local session using the
Microsoft.Windows.ServerManagerWorkflows configuration. After the session is instantiated the magic happens in the following Try/Catch/Finally blocks.
If you ran
$session = New-PSSession -ConfigurationName microsoft.windows.servermanagerworkflow in a PS prompt on it’s own, I’m betting you’d get the same error. To reinforce this, run
Get-PSSessionConfiguration | Select Name and I’ll bet you don’t see
microsoft.windows.servermanagerworkflows as part of the list. So, next step is to get you the session config you need.
Register-PSSessionConfiguration -Name Microsoft.Windows.ServerManagerWorkflows cmdlet and agree to the prompts. If successful run
Get-PSSessionConfiguration again and see if the workflows are listed. If they are, you should be good to go, or at least generate a new set of errors.
Kubernetes Free Online Tutorial, Kubernetes Beginner Tutorial
DevOps Free Online Tutorial, DevOps Beginner Tutorial
Ansible Free Online Tutorial, Ansible Beginner Tutorial
Docker Free Online Tutorial, Docker Beginner Tutorial
Openstack Free Online Tutorial, Openstack Beginner Tutorial
Disclaimer: This has been sourced from a third party syndicated feed through internet. We are not responsibility or liability for its dependability, trustworthiness, reliability and data of the text. We reserves the sole right to alter, delete or remove (without notice) the content in its absolute discretion for any reason whatsoever.