Is PowerShell different on physical and Hyper-V installations of Server 2022 Core?

Richard 0 Reputation points
2024-09-04T10:16:20.28+00:00

After installing Server 2022 Core on physical servers, I can run cmdlets such as ncpa.cpl and devmgmt.msc. After creating several Hyper-V instances of Server 2022 Core (from the same media, same enterprise license etc), these cmdlets aren't available, and the files don't appear to have been included (in system32 for example).

All have "Windows PowerShell 5.1" Feature installed and yet the VM's seem to have a much smaller set of commands.

So is there a difference with a Hyper-V instance of have I done or missed something? If you add roles such as AD or File and Storage, does that install extra cmdlets?

I thought it might be path related but the files don't seem to be there (that I can find).

The system is offline so some of the solutions for adding PowerShell modules won't work.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,923 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,688 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,458 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Daisy Zhou 22,476 Reputation points Microsoft Vendor
    2024-09-05T07:42:55.9966667+00:00

    Hello Richard,

    Thank you for posting in Q&A forum.

    The core functionality of PowerShell remains consistent across physical and virtual installations of Windows Server 2022 Core. However, differences arise due to the underlying hardware versus virtualized resources. These differences primarily affect cmdlets that interact with hardware, manage resources, or leverage virtualization-specific features.

    For specific references, you can review Microsoft's official documentation on PowerShell for Windows Server Core and Hyper-V While there are no blanket statements about differences in PowerShell behavior, the documentation for specific cmdlets or features (like Hyper-V cmdlets) might highlight environment-specific behavior.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  2. Rich Matheisen 46,551 Reputation points
    2024-09-06T02:03:15.14+00:00

    Neither ncpa.cpl or devmgmt.msc are cmdlets. Neither are they part of PowerShell.

    I think you haven't installed the Server Core App Compatibility feature on those VMs.

    https://www.reddit.com/r/sysadmin/comments/q24azo/windows_server_2022_server_core_app_compatibility/

    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.