Summary: Use Windows PowerShell 4.0 to find a virtual machine.
How can I use Windows PowerShell 4.0 to find a virtual machine when I only have partial name information so I can stop it or make other changes as required?
Use the Get-VM cmdlet to return virtual machine objects, use the dotted Where, and filter with a script block.
Add the name property, and use a regular expression (or wild card) to match the virtual machine
that you are interested in. The following command finds a virtual machine with a name that begins with c1:
(get-vm).Where{$_.name -match '^c1'}