I am in the process of creating a script that will be show different mailbox properties. Be low is the beginning of the script<\/p>\n
$BSBUsers = Get-Mailbox -Filter {CustomAttribute1 -eq “BSB”}
\nForEach ($User in $BSBUsers) {
\nGet-CASMailbox | where {$_.OWAEnabled}<\/p>\n
}<\/p>\n
The above works but the output is for everyone in the organization and not just the users with BSB set as CustomAttribute1. If I add a Write-Host $User it show the correct people.<\/p>\n
How do I fix this?<\/p>\n
Thanks in advance<\/p>","upvoteCount":3,"answerCount":11,"datePublished":"2018-10-24T16:55:23.000Z","author":{"@type":"Person","name":"damonvillar6266","url":"https://community.spiceworks.com/u/damonvillar6266"},"suggestedAnswer":[{"@type":"Answer","text":"
I am in the process of creating a script that will be show different mailbox properties. Be low is the beginning of the script<\/p>\n
$BSBUsers = Get-Mailbox -Filter {CustomAttribute1 -eq “BSB”}
\nForEach ($User in $BSBUsers) {
\nGet-CASMailbox | where {$_.OWAEnabled}<\/p>\n
}<\/p>\n
The above works but the output is for everyone in the organization and not just the users with BSB set as CustomAttribute1. If I add a Write-Host $User it show the correct people.<\/p>\n
How do I fix this?<\/p>\n
Thanks in advance<\/p>","upvoteCount":3,"datePublished":"2018-10-24T16:55:23.000Z","url":"https://community.spiceworks.com/t/feed-a-list-of-user-in-get-mailbox-command/680330/1","author":{"@type":"Person","name":"damonvillar6266","url":"https://community.spiceworks.com/u/damonvillar6266"}},{"@type":"Answer","text":"
If you post code, please use the insert code button! Please and thank you!<\/p>