- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could use a switch statement:
get-vm | %{
switch ($_.ExtensionData.Config.GuestFullname)
{
"Microsoft Windows Server 2012 (64-bit)" {"Do one thing"}
"Red Hat Enterprise Linux 6 (64-bit)" {"Do another"}
default {"I don't know what to do with $_"}
}
}