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.
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
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.
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/PowerShell/...