powershell Get-VM where name is not like

Question:

I am trying to run the Get-VM and filter out some VM’s by name.

So for example Get-VM | -name isnotlike “Web1” and “Web2”

How would I do this?

or something like this? But this doesn’t work

Answer:

Pipe your output from Get-VM to Where-Object:

Source:

powershell Get-VM where name is not like by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply