Skip to content

Bug: Localization issue with service name in New-LabVMsForHyperV.ps1 #10

@drakrilla75-rgb

Description

@drakrilla75-rgb

The PowerShell script New-LabVMsForHyperV.ps1 uses the following service name in line 89:

$Service = Get-Service -Name "Hyper-V Virtual Machine Management service"

On systems with a non-English system language (e.g., German), this fails because the service display name is localized. This results in a name conflict and prevents the script from running.

Steps to Reproduce

  1. Install Windows Server or Windows 11 in German
  2. Enable the Hyper-V role
  3. Run New-LabVMsForHyperV.ps1
  4. Error occurs at line 89, service not found

Expected Behavior
The script should work regardless of the system language.

Proposed Fix
Replace the localized display name with the language-independent service name vmms:

$Service = Get-Service -Name "vmms"

This ensures consistent execution across all system languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions