I know others have posted about this, but every thing i've tried so far hasn't worked. The issue i'm running into is that when I add brackets around my Where-Object statement, it turns the column that i'm trying to filter on into a function. Thus not allowing it to run.
$AgentList | Select-Object Leaf.NodeName, Properties.OSType, PropsView.version, BranchNode.Node | Where-Object{ (PropsView.version -lt '5.5.0.447') -and (Properties.OSType -ne 'Mac OS X')} | Sort-Object -Property EPOBranchNode.NodeTextPath2 -Descending
I'm hoping to be able to filter on both PropsView.version and Properties.OSType at the same time. At the moment I can do one or the other, but right when I try to add both I run into the error.
The term 'PropsView.version' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
$_.. Like this:($_.PropsView.version -lt '5.5.0.447') -and ($_.Properties.OSType -ne 'Mac OS X'). Also, consider swapping yourSelect-ObjectandWhere-Objectcalls as you are creating objects that you then through away (if they don't match the filter).$_.'PropsView.version'. It will also help if you show the output of$AgentList | Format-List | Select -First 1