Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Remove-RDSessionCollection and New-RDSessionCollection cmdlets do not work in Windows 8 and Windows 8.1


View products that this article applies to.

Symptoms

Assume that there is a Windows 8 or Windows 8.1-based computer that has Remote Server Administration Tools (RSAT) installed. When you run the Remove-RDSessionCollection or New-RDSessionCollection cmdlet in Windows PowerShell on the computer, the cmdlet fails. Additionally, you receive error messages that resemble the following:
New-PSSession : [localhost] Connecting to remote server localhost failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and 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.

At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\remotedesktop\SessionDesktopCollection.psm1:555 char:28
+ $workflowSession = New-PSSession -ConfigurationName Microsoft.Windows.Se ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CannotConnect,PSSessionOpenFailed

Invoke-Command : Cannot validate argument on parameter 'Session'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\remotedesktop\SessionDesktopCollection.psm1:557 char:33

+ Invoke-Command -Session $workflowSession -ArgumentList @($ConnectionBrok ...
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Invoke-Command], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeCommandCommand

Remove-RDSessionCollection : Unable to delete the session collection Farm2.

At line:1 char:1
+ Remove-RDSessionCollection -CollectionName Farm2 -ConnectionBroker rdvtest34.rdv ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Remove-RDSessionCollection

↑ Back to the top


Cause

This issue occurs because the WinRM service is not configured in Windows 8 or Windows 8.1.

↑ Back to the top


Resolution

To resolve this issue, run the WinRM QuickConfig command on the client computer that has RSAT installed.

Note After you run the command, the computer allows for remote management.

↑ Back to the top


Keywords: kbtshoot, kbsurveynew, kbexpertiseadvanced, kbfix, kberrmsg, kb

↑ Back to the top

Article Info
Article ID : 2920195
Revision : 1
Created on : 1/7/2017
Published on : 1/7/2014
Exists online : False
Views : 385