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.

1
Filtering with Get-ExoMailbox - Not filtering?
Post Flair (click to view more posts with a particular flair)
Post Body

I am trying to get a list of users with a specific UPN that are not assigned the correct address book policy. The docs say to use the policies canonical name

https://learn.microsoft.com/en-us/powershell/exchange/filter-properties?view=exchange-ps#addressbookpolicy

I am currently using this command, which seems like it should work

$policy = "CN=FULL POLICY CN"

get-exomailbox -filter {(Userprincipalname -like "$UPNSuffix") -and (addressbookpolicy -ne "$policy")} -properties addressbookpolicy -resultsize unlimited| select alias, addressbookpolicy

But instead it is spitting out all users with that suffix, instead of just filtering the ones that do not have the correct policy assigned. I have also tried using the ABP name instead of the CN and it has the same results.

I would rather do server side filtering, but if I have to get all users with their ABP and then filter client side I guess I will. Would be nice for the cmdlet to work like it says it should.

Author
Account Strength
100%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
62,781
Link Karma
1,004
Comment Karma
61,443
Profile updated: 13 hours ago
Posts updated: 8 months 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
1 year ago