windows-powershell-docs
windows-powershell-docs copied to clipboard
Get-VM -Name parameter "Accept wildcard characters:" is incorrect for only Server 2012 R2
Prerequisites
- [X] Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- [X] Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in
Get-Foo
cmdlet" instead of "Typo." - [X] Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.
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'.