Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

13
Need help with a where-object query
Post Flair (click to view more posts with a particular flair)
Post Body

I'm pulling a xls into a $var with import-excel. Storing a 2-digit column name in var $OSV

This Works: $var | Where-Object -Property $OSV -Match 'Windows'

This Doesn't: $var | Where-Object {$_.OSV -Match 'Windows' }

I've tried using single/double quotes, tried -like, verified the value I'm using shows up when I pipe $var| gm as the correct property name. I've tried little changes in the formatting of that section of the command and everything I do that doesn't generate an error takes the same time to run thru the array it just never outputs anything. The ideal end result will be something like:

$var| Where-Object {$_.OSV -Match -'Windows -and $_.OSV -Notmatch 'Server'}

Update: $var | Where-Object {$_.$OSV -Match 'Windows' } This Works.

Author
Account Strength
90%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
4,174
Link Karma
215
Comment Karma
3,959
Profile updated: 3 days ago
Posts updated: 3 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago