Share via

Microsoft 365 Deployment Lab Kit - Script error during setup

Ortman, Kyle 0 Reputation points
2026-02-25T18:16:38.42+00:00

Hi, I'm trying to install the Microsoft 365 Deployment Lab Kit to do some intune training.

https://www.microsoft.com/en-us/evalcenter/download-windows-11-office-365-lab-kit

When I go to install it, I receive an error:

The term 'get-vmswitch' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

<NULL> : Failed to find external switch

at line: 198 char: 5

  • throw "Failed to find external switch"

  • CategoryInfo: OperationStopped: (Failed to find external switch:String) [],RuntimeException
  • FullyQualifiedErrorID: Failed to find external switch
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Harry Phan 15,915 Reputation points Independent Advisor
    2026-02-26T04:32:19.5166667+00:00

    Hello Ortman,

    The error you’re seeing comes from the lab kit installer trying to run Get-VMSwitch, which is a Hyper‑V cmdlet. That means Hyper‑V isn’t enabled or available on the host you’re running the kit on, so the script can’t find an external virtual switch to bind the lab VMs. You need to make sure the Hyper‑V role is installed and active on your Windows 11 machine, then create an external virtual switch in Hyper‑V Manager that maps to your physical NIC. Once that’s in place, rerun the lab kit installer and it will detect the switch correctly. If you’re running inside another hypervisor like VMware or VirtualBox, the kit won’t work because it’s built specifically for Hyper‑V.

    Is it helpful? If it is, please hit Accept Answer or give it a thump up! Very appreciate :)

    Harry.

    0 comments No comments

  2. Q&A Assist
    2026-02-25T18:16:52.54+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The error message you're encountering, "The term 'get-vmswitch' is not recognized as the name of a cmdlet...", typically indicates that the required PowerShell module for managing virtual switches is not available or not imported in your current PowerShell session. Here are a few steps you can take to troubleshoot this issue:

    1. Ensure Hyper-V is Installed: The Get-VMSwitch cmdlet is part of the Hyper-V module. Make sure that Hyper-V is installed and enabled on your Windows machine. You can check this by going to "Turn Windows features on or off" and ensuring that Hyper-V is checked.
    2. Import the Hyper-V Module: If Hyper-V is installed, you may need to import the module manually. You can do this by running the following command in PowerShell:
         Import-Module Hyper-V
      
    3. Run PowerShell as Administrator: Ensure that you are running PowerShell with administrative privileges, as some cmdlets require elevated permissions.
    4. Check PowerShell Version: Make sure you are using a compatible version of PowerShell. You can check your version by running:
         $PSVersionTable.PSVersion
      
    5. Verify Execution Policy: Sometimes, the execution policy may prevent scripts from running. You can check your execution policy with:
         Get-ExecutionPolicy
      
      If necessary, you can change it to a less restrictive policy (e.g., RemoteSigned) using:
         Set-ExecutionPolicy RemoteSigned
      

    If you continue to experience issues, consider checking the installation documentation for the Microsoft 365 Deployment Lab Kit for any specific prerequisites or troubleshooting steps.


    References:

    0 comments No comments

Your answer

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