Bulk Add/Push Office365 Email Signature using powershell

$import= import-csv -Path ‘<PATH_TO_CSV_FILE>email-list.csv’ #location of CSV file $import | ForEach-Object { $sig = Get-Mailbox -Identity $_.identity.trim() Set-MailboxMessageConfiguration -Identity $sig.Alias -DefaultFontName ‘Arial’ -AutoAddSignature $true -AutoAddSignatureOnReply $true -SignatureHtml “<html><body><table border=’2′ cellspacing=’3′ cellpadding=’3′ style=’font-family:arial;’ width=’100%’> <tbody> <tr> <td rowspan=’2′ valign=’middle’ style=’width:200px;’ align=’center’><a href=’http://rajanmaharjan.com/?utm_source=logo&amp;utm_medium=signature’ target=’_blank’ ><img src=’http://rajanmaharjan.com.np/logo.png’ /></a> <p style=”margin-top:20px”> <span><a href=’https://www.facebook.com/maharjan.rajan” target=”_blank” […]

Push HTML Format Email Signature in Office365 from powershell

$sig = Get-Mailbox -Identity “rajan.maharjan” Set-MailboxMessageConfiguration -Identity $sig.Alias -DefaultFontName ‘Arial’ -AutoAddSignature $true -AutoAddSignatureOnReply $true -SignatureHtml “<html><body><table border=’2′ cellspacing=’3′ cellpadding=’3′ style=’font-family:arial;’ width=’100%’><tbody><tr><td rowspan=’2′ valign=’middle’ style=’width:200px;’ align=’center’><a href=’http://rajanmaharjan.com/?utm_source=logo&amp;utm_medium=signature’ target=’_blank’ ><img src=’http://rajanmaharjan.com.np/logo.png’ /></a><p style=’margin-top:20px’><span><a href=’https://www.facebook.com/maharjan.rajan’ target=’_blank’ rel=’noopener’><img alt=’facebook icon’ style=’border:0; height:25px; width:25px;’ src=’http://rajanmaharjan.com/icons/facebook.png’ width=’15’ border=’0’></a>&nbsp;&nbsp;</span> <span><a href=’https://twitter.com/rajan_maharjan’ target=’_blank’ rel=’noopener’><img alt=’twitter icon’ style=’border:0; height:25px; […]

Bulk add members to Distribution List (DL)

$UserCredential = Get-CredentialGet-DistributionGroupMember -Identity “GROUP_NAME@rajanmaharjan.com” | ft alias #to get current list members$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-pssession $Session$import= import-csv -Path ‘<PATH_TO_CSV_FILE>member-to-add-in-dl.csv’ #location of CSV file$import | ForEach-Object { Add-DistributionGroupMember -Identity “GROUP_NAME@rajanmaharjan.com” -Member $_.identity Write-host $_.identity ‘added to distribution list’}

Very first #PowerShell Basic

In windows 10, you just need to do run, Type “Powershell” and choose “Windows PowerShell ISE” You must have office365 Login $UserCredential = Get-Credential –it will ask for login credentials $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-pssession $session Thats it!!!, you are now ready […]

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top