Replace verification logic with print statement
This commit is contained in:
parent
9a53092bf7
commit
5a8031486b
@ -59,18 +59,15 @@ do
|
||||
Set-Mailbox -Identity $Alias.Displayname -EmailAddresses $Alias.EmailAddresses.Split(";")
|
||||
}
|
||||
|
||||
#Print the new values to console for verification
|
||||
Write-Host -ForegroundColor Green -BackgroundColor White "New Values:"
|
||||
|
||||
#Get the mailboxes from Exchange and print the email addresses to confirm the changes.
|
||||
Foreach ($Alias in $Alias_list) {
|
||||
$addresses = (Get-Mailbox -Identity $Alias.Displayname).EmailAddresses
|
||||
if ($addresses -eq $Alias.EmailAddresses) {
|
||||
Write-Host "$($Alias.Displayname)" -NoNewline
|
||||
Write-Host -ForegroundColor Green " Success!"
|
||||
}
|
||||
else {
|
||||
Write-Host "$($Alias.Displayname)" -NoNewline
|
||||
Write-Host -ForegroundColor Red " FAILURE"
|
||||
}
|
||||
}
|
||||
Write-Host -Foregroundcolor Red -Backgroundcolor White (Write-Output $Alias.Displayname);
|
||||
write-Host -foregroundcolor Green -Separator `n (Write-Output $addresses)
|
||||
}
|
||||
}
|
||||
'3' {
|
||||
#Ask the user what we're looking for and we're we're going to save the .csv
|
||||
|
Loading…
Reference in New Issue
Block a user