I am a rookie, don't understand what I am doing wrong.
When I use Get-Catalog -MyOrgOnly it returns all of the my catalogs.
When I use Get-Catalog -MyOrgOnly | Where-Object and then anything, nothing ever gets returned.
For example, I think Get-Catalog -MyOrgOnly | Where -Object -Property Name -contains 'EE2' should return more than one catalog. Nothing is ever returned.
I would be very appreciative if someone would tell me what I am doing wrong.
The -Contains operator expects an array on the left operand.
The pipeline presents one object at the time to the Where-clause, so no array.
You could try
Get-Catalog -MyOrgOnly | Where-Object {$_.Name -match 'EE2'}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The -Contains operator expects an array on the left operand.
The pipeline presents one object at the time to the Where-clause, so no array.
You could try
Get-Catalog -MyOrgOnly | Where-Object {$_.Name -match 'EE2'}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference