AD1080
asked on
Add Filter to For Each Powershell Script
Hi,
I need assistance to add a filter to the following powershell script, to allow me to test only a few email addresses, before running it on our entire directory. We can use "where the mailbox name contains "john"
I need assistance to add a filter to the following powershell script, to allow me to test only a few email addresses, before running it on our entire directory. We can use "where the mailbox name contains "john"
$Mailboxes = get-mailbox -resultsize "unlimited"
foreach ($Mailbox in $Mailboxes) {
Set-Mailbox -Identity $Mailbox -CustomAttribute1 $Mailbox.Office
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not a problem, glad to help!
Will.
Will.
ASKER