You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cmdlets that deal with PSSessions created on ContainerId throw a NullReferenceException when creating the session. This is true for New-PSSession, Enter-PSSession and Invoke-Command, among maybe others.
The stack trace is this:
Object reference not set to an instance of an object.
at System.Management.Automation.Runspaces.ContainerProcess.GetContainerProperties()
at Microsoft.PowerShell.Commands.PSExecutionCmdlet.CreateHelpersForSpecifiedContainerSession()
For me the line that fails is inside GetContainerPropertiesInternal of the class System.Management.Automation.Runspaces.ContainerProcess in System.Management.Automation.dll.
Cmdlets that deal with PSSessions created on ContainerId throw a NullReferenceException when creating the session. This is true for
New-PSSession,Enter-PSSessionandInvoke-Command, among maybe others.The stack trace is this:
For me the line that fails is inside
GetContainerPropertiesInternalof the classSystem.Management.Automation.Runspaces.ContainerProcessinSystem.Management.Automation.dll.ContainerObRoot = (string) computeSystemPropertiesType.GetProperty("ObRoot").GetValue(obj);Steps to reproduce
To reproduce this a running container is required.
Expected behavior
An instance of
PSSessionshould be created.Actual behavior
A NullReferenceException is thrown.
Environment data