WindowsPE with Hyper-V PowerShell module

skywalker 1 Reputation point
2022-06-28T21:58:22.37+00:00

Hi all,
Is there a way to add Hyper-V PowerShell module to WindowsPE? I'd like to be able to use one of its cmdlets in WindowsPE session.

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,921 Reputation points
    2022-06-29T15:19:38.653+00:00

    Hello,

    Maybe this article will help you further:

    WinPE: Adding Windows PowerShell support to Windows PE

    https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/winpe-adding-powershell-support-to-windows-pe?view=windows-11

    In addition you can check the PowerShell Gallery modules for Windows Server Administration:

    https://techcommunity.microsoft.com/t5/itops-talk-blog/5-powershell-gallery-modules-for-windows-server-administration/ba-p/2277836

    --------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  2. skywalker 1 Reputation point
    2022-06-29T16:05:16.743+00:00

    Thank you for your feedback. I've gone through these articles before, enabled all PS features on WindowsPE, but no Hyper-V cmdlets in WindowsPE.

    I've gone down the path of trying to figure out where modules are typically located. Hyper-V module is a binary type so I've copied all necessary module folders and .dll files to corresponding location on WindowsPE and was finally able to get the PowerShell cmdlets for Hyper-V on WindowsPE to show up in PowerShell console, but my excitement was short lived. While I can get to cmdlets, they are not working and now I get the following error:

    The Hyper-V Management Tools could not access an expected WMI class on computer <computername>. This may indicate that the Hyper-V Platform is not installed on the computer or that the version of the Hyper-V Platform is incompatible with these management tools.

    At this point I'm pretty sure this isn't supported at all. I'm still wondering though if I can somehow get it to work in "unsupported" mode.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.