Hi guys,
How can i get a condition with function onto "where" ?
somthing like that:
Get-VM | where{@{N="Path";E={Get-Path -Object $_}} -Like "*SAP*"}
I do not want get a container with select-objects properties, i want take an a object.
It's working when i call function in Select-objects level and then check the result column into "where".
PS. sorry for my english i am not native speaker.
You could do something like this
Get-VM | where{(Get-Path -Object $_) -Like "*SAP*"}
But it depends on what the function Get-Path is actually returning ?
Does it return a [string] object ? If yes, the above should work.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You could do something like this
Get-VM | where{(Get-Path -Object $_) -Like "*SAP*"}
But it depends on what the function Get-Path is actually returning ?
Does it return a [string] object ? If yes, the above should work.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Luc, thank for your comment, working perfectly.