Moretimaxi | Office365 Modificar displayname powershell
383
post-template-default,single,single-post,postid-383,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-13.7,qode-theme-bridge,wpb-js-composer js-comp-ver-5.4.5,vc_responsive
 

Office365 Modificar displayname powershell

Office365 Modificar displayname powershell

En este pequeño script veran como modificar el display name de todos los usuarios o podran filtrarlos por departamento, pais por ejempolo:

$users = Get-User -ResultSize Unlimited -Filter “Recipienttype -eq ‘UserMailbox'”
$users | ForEach-Object{
$displayname='{0} {1}’ -f $_.FirstName, $_.LastName + ” [Morettimaxi Argentina]”
write-Host “Setting: $displayname” -fore green
$_ | Set-user -DisplayName $displayname
}

 

Filtrar por departamento, ejemplo compras:

 

$users = Get-User -ResultSize Unlimited | where { $_.Department -eq “compras”}
$users | ForEach-Object{
$displayname='{0} {1}’ -f $_.FirstName, $_.LastName + ” [Morettimaxi Argentina]”
write-Host “Setting: $displayname” -fore green
$_ | Set-user -DisplayName $displayname
}

 

 

No Comments

Post A Comment