Office 365: How to add a new e-mail alias to several Office 365 users in bulk using PowerShell!

This time I’m sharing a PowerShell script that allows to add a new e-mail alias to existing Office 365 users in buk. The users to be updated are read from a CSV file. You can download the script from the following URL:  How to a new e-mail alias to several existing O365 users in bulk

############################################################################################################################################
# Script that allows to do a add users to add e-mail addresses to Office 365 users in bulk using the same UPN. The users are read from a CSV file. 
# The csv file only needs a column that stores the account principal name for each user to be added to Office 365
# Required Parameters:
#  -> $sUserName: User Name to connect to the SharePoint Admin Center.
#  -> $NewDomain: Domain of the new e-mail to be added to the user.
#  -> $sMessage: Message to show in the user credentials prompt.
#  -> $sInputFile: Message to show in the user credentials prompt.
############################################################################################################################################

$host.Runspace.ThreadOptions = "ReuseThread"

#Definition of the function that allows to add to Office 365 the list of users contained in the CSV file.
function Add-NewEMailAddressToUsers
{
    param ($sInputFile,$sNewDomain)
    try
    {   
        # Reading the Users CSV file
        $bFileExists = (Test-Path $sInputFile -PathType Leaf) 
        if ($bFileExists) { 
            "Loading $sInputFile for processing..." 
            $tblUsers = Import-CSV $sInputFile            
        } else { 
            Write-Host "$sInputFile file not found. Stopping the import process!" -ForegroundColor Red
            exit 
        }         
        
        # Deleting the users
        Write-Host "Adding new E-Mails to Office 365 Users ..." -ForegroundColor Green    
        foreach ($user in $tblUsers) 
        {             
            $sUPNPart=$user.UserPrincipalName.Split("@")[0]            
            $sNewEMailToAdd=$sUPNPart + $sNewDomain
             "Adding new E-Mail $sNewEMailToAdd to User " + $user.UserPrincipalName.ToString()  	
            Set-Mailbox -Identity $user.UserPrincipalName -EmailAddresses @{add=$sNewEMailToAdd}            
        } 

        Write-Host "-----------------------------------------------------------"  -ForegroundColor Green
        Write-Host "All the e-mails have been added. The processs is completed." -ForegroundColor Green
        Write-Host "-----------------------------------------------------------"  -ForegroundColor Green
    }
    catch [System.Exception]
    {
        Write-Host -ForegroundColor Red $_.Exception.ToString()   
    } 
}

#Connection to Office 365
$sUserName="<O365_Admin>"
$sMessage="Introduce your Office 365 Credentials"
#Connection to Office 365


$O365cred = Get-Credential -UserName $sUserName -Message $sMessage
$PSSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $O365cred -Authentication Basic -AllowRedirection
Import-PSSession $PSSession

$ScriptDir = Split-Path -parent $MyInvocation.MyCommand.Path
#$sInputFile=$ScriptDir+ "\O365UsersToUpdate.csv"

$sNewDomain="@<YourDomain>.onmicrosoft.com"

Add-NewEMailAddressToUsers -sInputFile $sInputFile -sNewDomain $sNewDomain
Anuncios

Office 365: Como añadir un alias de correo de forma masiva con PowerShell!

En esta ocasión os comparto un Script PowerShell que permite añadir alias de correo de forma masiva en Office 365. La información de los usuarios a los que se va a añadir un alias se recoge de un archivo CSV. Podéis descargaros el script desde el siguiente enlace:  How to a new e-mail alias to several existing O365 users in bulk

############################################################################################################################################
# Script that allows to do a add users to add e-mail addresses to Office 365 users in bulk using the same UPN. The users are read from a CSV file. 
# The csv file only needs a column that stores the account principal name for each user to be added to Office 365
# Required Parameters:
#  -> $sUserName: User Name to connect to the SharePoint Admin Center.
#  -> $NewDomain: Domain of the new e-mail to be added to the user.
#  -> $sMessage: Message to show in the user credentials prompt.
#  -> $sInputFile: Message to show in the user credentials prompt.
############################################################################################################################################

$host.Runspace.ThreadOptions = "ReuseThread"

#Definition of the function that allows to add to Office 365 the list of users contained in the CSV file.
function Add-NewEMailAddressToUsers
{
    param ($sInputFile,$sNewDomain)
    try
    {   
        # Reading the Users CSV file
        $bFileExists = (Test-Path $sInputFile -PathType Leaf) 
        if ($bFileExists) { 
            "Loading $sInputFile for processing..." 
            $tblUsers = Import-CSV $sInputFile            
        } else { 
            Write-Host "$sInputFile file not found. Stopping the import process!" -ForegroundColor Red
            exit 
        }         
        
        # Deleting the users
        Write-Host "Adding new E-Mails to Office 365 Users ..." -ForegroundColor Green    
        foreach ($user in $tblUsers) 
        {             
            $sUPNPart=$user.UserPrincipalName.Split("@")[0]            
            $sNewEMailToAdd=$sUPNPart + $sNewDomain
             "Adding new E-Mail $sNewEMailToAdd to User " + $user.UserPrincipalName.ToString()  	
            Set-Mailbox -Identity $user.UserPrincipalName -EmailAddresses @{add=$sNewEMailToAdd}            
        } 

        Write-Host "-----------------------------------------------------------"  -ForegroundColor Green
        Write-Host "All the e-mails have been added. The processs is completed." -ForegroundColor Green
        Write-Host "-----------------------------------------------------------"  -ForegroundColor Green
    }
    catch [System.Exception]
    {
        Write-Host -ForegroundColor Red $_.Exception.ToString()   
    } 
}

#Connection to Office 365
$sUserName="<O365_Admin>"
$sMessage="Introduce your Office 365 Credentials"
#Connection to Office 365


$O365cred = Get-Credential -UserName $sUserName -Message $sMessage
$PSSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $O365cred -Authentication Basic -AllowRedirection
Import-PSSession $PSSession

$ScriptDir = Split-Path -parent $MyInvocation.MyCommand.Path
#$sInputFile=$ScriptDir+ "\O365UsersToUpdate.csv"

$sNewDomain="@<YourDomain>.onmicrosoft.com"

Add-NewEMailAddressToUsers -sInputFile $sInputFile -sNewDomain $sNewDomain

Eventos: Disponible la grabación del Ask The Experts sobre desarrollo para Office 365!

Como continuación del Global Office 365 Developer Bootcamp del 4 de noviembre, el pasado 29 de noviembre realizamos un Ask The Experts sobre desarrollo para Office 365 en el que tuvimos la oportunidad de debatir durante 1,5 horas sobre varios aspectos sobre desarrollo para Office 365 en general, y para SharePoint Online en particular sin olvidarnos de la importancia de Azure Smile. La sesión estuvo muy entretenida y aprovechando que Skype for Business nos permite grabar este tipo de reuniones por lo que aquellos que no pudisteis asistir al Ask The Experts podéis visualizarla desde el canal de YouTube de CompartiMOSS:

Office 365: How to set a defaul password to several Office 365 users in bulk!

This time I’m sharing a new PowerShell script that allows to set a default passowrd to several Office 365 users in bulk. The users to be updated are read from a CSV file. You can download the PowerShell Script from the following URL: How to set a default password to several Office 365 users in bulk

############################################################################################################################################
# Script that allows to set a default password to serveral users in your Office 365 tenants. The users are read from a CSV file. 
# The csv file only needs a column that stores the account principal name for each user to be added to Office 365.
# Required Parameters:
#  -> $sUserName: User Name to connect to the SharePoint Admin Center.
#  -> $sDefaultPassword: Common password to be set for all the users in the CSV file.
#  -> $sMessage: Message to show in the user credentials prompt.
#  -> $sInputFile: Message to show in the user credentials prompt.
############################################################################################################################################

$host.Runspace.ThreadOptions = "ReuseThread"

#Definition of the function that allows to add to Office 365 the list of users contained in the CSV file.
function Set-PasswordToUsers
{
    param ($sInputFile,$sDefaultPassword)
    try
    {   
        # Reading the Users CSV file
        $bFileExists = (Test-Path $sInputFile -PathType Leaf) 
        if ($bFileExists) { 
            "Loading $sInputFile for processing..." 
            $tblUsers = Import-CSV $sInputFile            
        } else { 
            Write-Host "$sInputFile file not found. Stopping the import process!" -ForegroundColor Red
            exit 
        }         
        
        # Deleting the users
        Write-Host "Changing password for Office 365 user..." -ForegroundColor Green    
        foreach ($user in $tblUsers) 
        {   
            Write-Host "Changing password for user " $user.UserPrincipalName.ToString()  	          
            Set-MsolUserPassword -UserPrincipalName $user.UserPrincipalName -NewPassword $sDefaultPassword -ForceChangePassword $true           
        } 

        Write-Host "-----------------------------------------------------------"  -ForegroundColor Green
        Write-Host "All passwords have been updated. The processs is completed." -ForegroundColor Green
        Write-Host "-----------------------------------------------------------"  -ForegroundColor Green
    }
    catch [System.Exception]
    {
        Write-Host -ForegroundColor Red $_.Exception.ToString()   
    } 
}

#Connection to Office 365
$sUserName="<O365_Admin>
$sMessage="Introduce your Office 365 Credentials"
#Connection to Office 365
$O365Cred = Get-Credential -UserName $sUserName -Message $sMessage

Connect-MsolService -Credential $O365Cred

$ScriptDir = Split-Path -parent $MyInvocation.MyCommand.Path
$sInputFile=$ScriptDir+ "\O365UsersToUpdate.csv"

$sDefaultPassword="<Default_Password>"

Set-PasswordToUsers -sInputFile $sInputFile -sDefaultPassword $sDefaultPassword

Office 365: Como establecer un password por defecto de forma masiva con PowerShell!

En esta ocasión os comparto un Script PowerShell que permite fijar una contraseña por defecto para una serie de usuarios de Office 365. Los usuarios a actualizar se leen de un archivo CSV. Podéis descargaros el script desde el siguiente enlace: How to set a default password to several Office 365 users in bulk

############################################################################################################################################
# Script that allows to set a default password to serveral users in your Office 365 tenants. The users are read from a CSV file. 
# The csv file only needs a column that stores the account principal name for each user to be added to Office 365.
# Required Parameters:
#  -> $sUserName: User Name to connect to the SharePoint Admin Center.
#  -> $sDefaultPassword: Common password to be set for all the users in the CSV file.
#  -> $sMessage: Message to show in the user credentials prompt.
#  -> $sInputFile: Message to show in the user credentials prompt.
############################################################################################################################################

$host.Runspace.ThreadOptions = "ReuseThread"

#Definition of the function that allows to add to Office 365 the list of users contained in the CSV file.
function Set-PasswordToUsers
{
    param ($sInputFile,$sDefaultPassword)
    try
    {   
        # Reading the Users CSV file
        $bFileExists = (Test-Path $sInputFile -PathType Leaf) 
        if ($bFileExists) { 
            "Loading $sInputFile for processing..." 
            $tblUsers = Import-CSV $sInputFile            
        } else { 
            Write-Host "$sInputFile file not found. Stopping the import process!" -ForegroundColor Red
            exit 
        }         
        
        # Deleting the users
        Write-Host "Changing password for Office 365 user..." -ForegroundColor Green    
        foreach ($user in $tblUsers) 
        {   
            Write-Host "Changing password for user " $user.UserPrincipalName.ToString()  	          
            Set-MsolUserPassword -UserPrincipalName $user.UserPrincipalName -NewPassword $sDefaultPassword -ForceChangePassword $true           
        } 

        Write-Host "-----------------------------------------------------------"  -ForegroundColor Green
        Write-Host "All passwords have been updated. The processs is completed." -ForegroundColor Green
        Write-Host "-----------------------------------------------------------"  -ForegroundColor Green
    }
    catch [System.Exception]
    {
        Write-Host -ForegroundColor Red $_.Exception.ToString()   
    } 
}

#Connection to Office 365
$sUserName="<O365_Admin>
$sMessage="Introduce your Office 365 Credentials"
#Connection to Office 365
$O365Cred = Get-Credential -UserName $sUserName -Message $sMessage

Connect-MsolService -Credential $O365Cred

$ScriptDir = Split-Path -parent $MyInvocation.MyCommand.Path
$sInputFile=$ScriptDir+ "\O365UsersToUpdate.csv"

$sDefaultPassword="<Default_Password>"

Set-PasswordToUsers -sInputFile $sInputFile -sDefaultPassword $sDefaultPassword

Office 365: Últimas novedades en Microsoft Teams!

Microsoft Teams es una de las apuestas más fuertes de Microsoft en Office 365 como hub de colaboración y productividad como demuestra las novedades que semana a semana y mes a mes vamos viendo en la plataforma. Entre las últimas novedades (noviembre de 2017) encontraremos:

  • PowerShell para Microsoft Teams: Por fin tenemos una primera versión preliminar de comandos PowerShell para Microsoft Teams.

Manage Microsoft Team with PowerShell

  • Informes de uso de Microsoft Teams: Ya podemos medir la adopción de Microsoft Teams haciendo uso de los 2 informes de uso que Microsoft ha liberado en Office 365 (No tenemos todavía informes de uso como parte del Power BI Adoption Pack para Microsoft Teams).

Track usage of Microsoft Teams

  • Soporte de acceso condicional a Teams desde dispositivos MAC.
  • Posibilidad de abandonar un chat de grupo.
  • Más configuraciones a nivel de Team de forma que podemos configurar si es posible o no postear en el canal General de un Team y bajo que condiciones se puede postear.
  • Acceso centralizado a las distintas configuraciones que como usuarios tenemos disponibles en la aplicación de Teams.

Updated personal settings

  • Nuevos bots y nuevos conectores.
  •  

Referencia:

Office 365: Updated the Network Assesment Tool for Skype for Business and Teams!

Microsoft has just released a new update of the Network Assesment Tool for Skype for Business and Microsoft Teams. For more information about this update, check the announcement made at the Microsoft Tech Community:

https://techcommunity.microsoft.com/t5/Microsoft-Teams/Annoucement-Updated-Network-Assessment-Tool-released-on-12-8/m-p/135586#M9770

You can download the Network Assesment too for Skype for Business and Teams from the following URL: https://www.microsoft.com/en-us/download/details.aspx?id=53885