MicrosoftDocs / windows-powershell-docs

This repo is used to contribute to Windows 10, Windows Server 2016, and MDOP PowerShell module documentation.
Creative Commons Attribution 4.0 International
441 stars 592 forks source link

Get-VM -Name parameter "Accept wildcard characters:" is incorrect for only Server 2012 R2 #3768

Open thegraffix opened 7 months ago

thegraffix commented 7 months ago

Prerequisites

Links

https://learn.microsoft.com/en-us/powershell/module/hyper-v/get-vm?view=winserver2012r2-ps#-name

Summary

Server 2012 R2's Get-VM help states that -Name doesn't accept wildcard when it actually does.

Details

Server 2012 R2's Get-VM help page states that the -Name parameter doesn't accept wildcard characters, which is inaccurate. It does accept wildcard characters. All other operating system help pages state (correctly) that -Name does accept wildcard characters.

https://learn.microsoft.com/en-us/powershell/module/hyper-v/get-vm?view=windowsserver2025-ps#-name https://learn.microsoft.com/en-us/powershell/module/hyper-v/get-vm?view=winserver2012-ps#-name https://learn.microsoft.com/en-us/powershell/module/hyper-v/get-vm?view=windowsserver2016-ps#-name https://learn.microsoft.com/en-us/powershell/module/hyper-v/get-vm?view=windowsserver2019-ps#-name https://learn.microsoft.com/en-us/powershell/module/hyper-v/get-vm?view=windowsserver2022-ps#-name

Suggested Fix

Change Server 2012 R2 Get-VM -Name parameter's Accept wildcard characters: property value from 'False' to 'True'.