Link to home
Start Free TrialLog in
Avatar of dgswin
dgswinFlag for Canada

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
Avatar of Mahesh Sharma
Mahesh Sharma
Flag of United States of America image

Give a try to this:

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
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial