Skip to content

Fix Enter-PSSession -ContainerId for newest Windows - #7883

Merged
Dongbo Wang (daxian-dbw) merged 4 commits into
PowerShell:masterfrom
SteveL-MSFT:enter-pssession-container
Oct 9, 2018
Merged

Fix Enter-PSSession -ContainerId for newest Windows#7883
Dongbo Wang (daxian-dbw) merged 4 commits into
PowerShell:masterfrom
SteveL-MSFT:enter-pssession-container

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Sep 27, 2018

Copy link
Copy Markdown
Member

PR Summary

The code tries to retrieve the runtimeid of the container, but Hyper-V team changed the type name (namespace) and from a property to a field. To support older Windows, we first check for the new type and then fallback to checking for the old type.

Fix #5794

PR Checklist

…heck for new type and fall back to old type

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 339abe0 into PowerShell:master Oct 9, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the enter-pssession-container branch October 9, 2018 21:52
Aditya Patwardhan (adityapatwardhan) pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 9, 2019
…#7883)

Hyper-V team changed the type used to get the `runtimeid`. We need to check for new type and fall back to old type.
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…#7883)

Hyper-V team changed the type used to get the `runtimeid`. We need to check for new type and fall back to old type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enter-PSSession -ContainerId $id returns Object reference not set to an instance of an object.

4 participants