dgswin
asked on
Exchange 2007 - Management power shell
Can you tell me what is the cmdlet for this result? See file Picture1
For each maibox display nam contains (DGATI), I want to replace by (DGARI)
What is the cmdlet for execute this?
Picture1.jpg
For each maibox display nam contains (DGATI), I want to replace by (DGARI)
What is the cmdlet for execute this?
Picture1.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1. Export all mailbox with matching condition to csv file.
Get-Mailbox -resultsize unlimited | where-object {$_.CustomAttribute1 -eq "<Value>" -and $_.DisplayName -Match 'DGATI' } | Select Alias, DisplayName | Export-Csv c:\output.csv
2. Not open CSV & replace all DGATI with DGARI
If csv contains " with all reocrds, replace them with null value. Remove first row as well.
3. Import the csv back to mailboxes.
$Temp = Import-Csv c:\output.csv
Foreach ($tmp in $temp) {Get-Mailbox $tmp.Alias | Set-Mailbox -DisplayName $tmp.DisplayName}
Always Try in lab first