I was wondering more about the foreach function though.
And how to nest commandlets, there are other cases where I would like to get information about a device and highlight its parent.
For example the Get-NetworkAdapter, I cant manage to get the name of the vm its connected to.