PS> Invoke-Command -VMName $vmName -Credential $creds -ConfigurationName PowerShell.7 -ScriptBlock { $PSVersionTable }
Name Value
---- -----
WSManStackVersion 3.0
OS Microsoft Windows 10.0.19044
PSVersion 7.3.0
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
GitCommitId 7.3.0
Platform Win32NT
PSEdition Core
PS> Invoke-Command -VMName $vmName -Credential $creds -ConfigurationName PowerShell.7 -ScriptBlock { $PSVersionTable }
OpenError: Cannot create or open the configuration session PowerShell.7.
PS> Get-Error
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.PSInvalidOperationException: Cannot create or open the
configuration session PowerShell.7. ---> System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to
remote server localhost failed with the following error message : <f:WSManFault
xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2689860592"
Machine="localhost"><f:Message><f:ProviderFault provider="PowerShell.7"
path="C:\Windows\system32\PowerShell\7.3.0\pwrshplugin.dll"></f:ProviderFault></f:Message></f:WSManFault> For more information,
see the about_Remote_Troubleshooting Help topic.
at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.EndOpen(IAsyncResult
asyncResult)
at System.Management.Automation.RemoteRunspace.Open()
at System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String
configurationName, PSHost host)
--- End of inner exception stack trace ---
at System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String
configurationName, PSHost host)
at
System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreatedForTypeTable(Object sender, RunspaceCreatedEventArgs
args)
at System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreated(Object sender,
RunspaceCreatedEventArgs args)
at System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1 eventHandler,
Object sender, T eventArgs)
at System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1 eventHandler,
Object sender, T eventArgs)
at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.CreateRunspace()
at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.OpenHelper()
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.PSInvalidOperationException: Cannot create or open the
configuration session PowerShell.7. ---> System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to
remote server localhost failed with the following error message : <f:WSManFault
xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2689860592"
Machine="localhost"><f:Message><f:ProviderFault provider="PowerShell.7"
path="C:\Windows\system32\PowerShell\7.3.0\pwrshplugin.dll"></f:ProviderFault></f:Message></f:WSManFault> For more information,
see the about_Remote_Troubleshooting Help topic.
at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.EndOpen(IAsyncResult asyncResult)
at System.Management.Automation.RemoteRunspace.Open()
at System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String
configurationName, PSHost host)
--- End of inner exception stack trace ---
at System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String
configurationName, PSHost host)
at
System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreatedForTypeTable(Object sender, RunspaceCreatedEventArgs
args)
at System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreated(Object
sender, RunspaceCreatedEventArgs args)
at System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1
eventHandler, Object sender, T eventArgs)
at System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1
eventHandler, Object sender, T eventArgs)
at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.CreateRunspace()
at System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.OpenHelper()
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.PSInvalidOperationException: Cannot create or open
the configuration session PowerShell.7. ---> System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to
remote server localhost failed with the following error message : <f:WSManFault
xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2689860592"
Machine="localhost"><f:Message><f:ProviderFault provider="PowerShell.7"
path="C:\Windows\system32\PowerShell\7.3.0\pwrshplugin.dll"></f:ProviderFault></f:Message></f:WSManFault> For more information,
see the about_Remote_Troubleshooting Help topic.
at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.EndOpen(IAsyncResult asyncResult)
at System.Management.Automation.RemoteRunspace.Open()
at System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String
configurationName, PSHost host)
--- End of inner exception stack trace ---
at System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String
configurationName, PSHost host)
at
System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreatedForTypeTable(Object sender, RunspaceCreatedEventArgs
args)
at
System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreated(Object sender, RunspaceCreatedEventArgs args)
at System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1
eventHandler, Object sender, T eventArgs)
at System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1
eventHandler, Object sender, T eventArgs)
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.CreateRunspace()
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.OpenHelper()
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.PSInvalidOperationException: Cannot create
or open the configuration session PowerShell.7. ---> System.Management.Automation.Remoting.PSRemotingTransportException:
Connecting to remote server localhost failed with the following error message : <f:WSManFault
xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2689860592"
Machine="localhost"><f:Message><f:ProviderFault provider="PowerShell.7"
path="C:\Windows\system32\PowerShell\7.3.0\pwrshplugin.dll"></f:ProviderFault></f:Message></f:WSManFault> For more information,
see the about_Remote_Troubleshooting Help topic.
at System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.EndOpen(IAsyncResult asyncResult)
at System.Management.Automation.RemoteRunspace.Open()
at
System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String configurationName, PSHost host)
--- End of inner exception stack trace ---
at
System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String configurationName, PSHost host)
at
System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreatedForTypeTable(Object sender, RunspaceCreatedEventArgs
args)
at
System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreated(Object sender, RunspaceCreatedEventArgs args)
at
System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1 eventHandler, Object sender, T eventArgs)
at
System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1 eventHandler, Object sender, T eventArgs)
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.CreateRunspace()
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.OpenHelper()
ErrorRecord :
Exception :
Type : System.Management.Automation.RemoteException
SerializedRemoteException : System.Management.Automation.PSInvalidOperationException:
Cannot create or open the configuration session PowerShell.7. --->
System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server localhost failed with the
following error message : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2689860592"
Machine="localhost"><f:Message><f:ProviderFault provider="PowerShell.7"
path="C:\Windows\system32\PowerShell\7.3.0\pwrshplugin.dll"></f:ProviderFault></f:Message></f:WSManFault> For more information,
see the about_Remote_Troubleshooting Help topic.
at
System.Management.Automation.Runspaces.AsyncResult.EndInvoke()
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.EndOpen(IAsyncResult asyncResult)
at System.Management.Automation.RemoteRunspace.Open()
at
System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String configurationName, PSHost host)
--- End of inner exception stack trace ---
at
System.Management.Automation.HostUtilities.CreateConfiguredRunspace(String configurationName, PSHost host)
at
System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreatedForTypeTable(Object sender, RunspaceCreatedEventArgs
args)
at
System.Management.Automation.ServerRunspacePoolDriver.HandleRunspaceCreated(Object sender, RunspaceCreatedEventArgs args)
at
System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1 eventHandler, Object sender, T eventArgs)
at
System.Management.Automation.ExtensionMethods.SafeInvoke[T](EventHandler`1 eventHandler, Object sender, T eventArgs)
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.CreateRunspace()
at
System.Management.Automation.Runspaces.Internal.RunspacePoolInternal.OpenHelper()
ErrorRecord : …
Message : Cannot create or open the configuration session PowerShell.7.
HResult : -2146233087
CategoryInfo : InvalidOperation: (:) [], PSInvalidOperationException
FullyQualifiedErrorId : InvalidOperation
Message : Cannot create or open the configuration session PowerShell.7.
HResult : -2146233087
CategoryInfo : InvalidOperation: (:) [], PSInvalidOperationException
FullyQualifiedErrorId : InvalidOperation
Message : Cannot create or open the configuration session PowerShell.7.
HResult : -2146233087
CategoryInfo : InvalidOperation: (:) [], PSInvalidOperationException
FullyQualifiedErrorId : InvalidOperation
Message : Cannot create or open the configuration session PowerShell.7.
HResult : -2146233087
CategoryInfo : InvalidOperation: (:) [], PSInvalidOperationException
FullyQualifiedErrorId : InvalidOperation
Message : Cannot create or open the configuration session PowerShell.7.
HResult : -2146233087
TargetObject : Win10Test
CategoryInfo : OpenError: (Win10Test:String) [], RemoteException
FullyQualifiedErrorId : PSSessionStateBroken
Prerequisites
Steps to reproduce
Administratorsgroupwinget install --id Microsoft.Powershell --source winget)Enable-PSRemotingto create PSSession Configurations (i.e. "PowerShell.7")Invoke-Command -VMName $vmName -Credential $creds -ConfigurationName PowerShell.7 -ScriptBlock { $PSVersionTable }Administratorsgroup and add them to theRemote Management Usersgroup.Invoke-Command -VMName $vmName -Credential $creds -ConfigurationName PowerShell.7 -ScriptBlock { $PSVersionTable }Set-PSSessionConfiguration -Name PowerShell.7 -ShowSecurityDescriptorUIInvoke-Command -VMName $vmName -Credential $creds -ConfigurationName PowerShell.7 -ScriptBlock { $PSVersionTable }Expected behavior
Actual behavior
Error details
Environment data
Visuals
No response