Script to set Outlook 2010/2013 signature using AD information - Version 2.4

This Powershell script will gather information from AD and automatically populate the fields in the signature. Possible to manage signature versions and set editable or non-editable signatures.

 
 
 
 
 
4.9 Star
(17)
9,011 times
Add to favorites
Office
8/16/2015
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Como ejecutar?
    1 Posts | Last post October 22, 2018
    • Buen dia, cual es el proceso para ejecutar el script? 
  • office365?
    1 Posts | Last post May 18, 2018
    • will this work with office 365 ?
  • User cant additional signatures in Outlook
    1 Posts | Last post May 09, 2018
    • Hi,
      
      I have an issue that users cant add aditonal signatures after getting this script.
      
      Anyone know what attribute i can change or add so this is the main and forced signature, but they can add additional signatures that they can switch between.
      
      Thanks
  • Attribut emty
    1 Posts | Last post November 24, 2017
    • is it possible to remove the complete line when attribut is empty?
  • Has anyone been able to add the e-mail and hyperlink to the signature?
    2 Posts | Last post November 02, 2017
    • For example, if the signature file contains text Email or E-mail, replace that text with the variable $ADEmailAddress.
    • This is what I use to change hyperlinks:
      
      foreach($link in $MSWord.ActiveDocument.Hyperlinks) {
      	if ($link.Address -like "https://www.google.com/") {
      		$link.Address = $ADURL.ToString()
      	}elseif ($link.Address -like "https://www.facebook.com/") {
      		$link.Address = $ADFB.ToString()
      	}elseif ($link.Address -like "mailto:email"){
        		$link.Address = "mailto:$ADEmailAddress"
       	}
      }
  • Not running on windows 10
    1 Posts | Last post October 21, 2017
    • I hope someone can help, I have been using this script and has been working fine on windows 7. Recently got some new machines with Windows 10 and the script doesn't work on windows 10 machines. From the error, it's showing that the word (docx) file is not being opened.  Can someone please help with this? 
      
      Copying Signatures
      You cannot call a method on a null-valued expression.
      At \\ges.com\NETLOGON\sig_files\set_outlook_signature2.ps1:76 char:1
      + $MSWord.Documents.Open($fullPath)
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
          + FullyQualifiedErrorId : InvokeMethodOnNull
      
      You cannot call a method on a null-valued expression.
      At \\ges.com\NETLOGON\sig_files\set_outlook_signature2.ps1:81 char:1
      + $MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
          + FullyQualifiedErrorId : InvokeMethodOnNull
  • More Informational then a question...
    1 Posts | Last post July 12, 2017
    • I worked on this script for Office 2016 and I noticed a few things.
      
      1. The Downloaded script is not the same as the sample on the description page. If you download the script you will need to update the Office 2010, Office 2013 sections if you want the signatures to apply, but not be forced.
      
      2. If you want the script to work for Office 2016 just append the following section.
      
      #Office 2016 signature
      If (Test-Path HKCU:Software\Microsoft\Office\16.0) {
          Write-Output "Setting signature for Office 2016"
      
          If ($ForceSignature -eq '0')
      
          {
              Write-Output "Setting Office 2016 as available"
      
              $MSWord = New-Object -ComObject word.application
              $EmailOptions = $MSWord.EmailOptions
              $EmailSignature = $EmailOptions.EmailSignature
              $EmailSignatureEntries = $EmailSignature.EmailSignatureEntries
              $EmailSignature.NewMessageSignature="$SignatureName"
              $EmailSignature.ReplyMessageSignature="$SignatureName"
              Stop-Process -Name $Outlook
      
          }
      
      If ($ForceSignature -eq '1') {
          Write-Output "Setting signature for Office 2016 as forced"
              If (Get-ItemProperty -Name 'NewSignature' -Path HKCU:'\Software\Microsoft\Office\16.0\Common\MailSettings') { } 
              Else { 
                  New-ItemProperty HKCU:'\Software\Microsoft\Office\16.0\Common\MailSettings' -Name 'NewSignature' -Value $SignatureName -PropertyType 'String' -Force 
              } 
              If (Get-ItemProperty -Name 'ReplySignature' -Path HKCU:'\Software\Microsoft\Office\16.0\Common\MailSettings') { } 
              Else { 
                  New-ItemProperty HKCU:'\Software\Microsoft\Office\16.0\Common\MailSettings' -Name 'ReplySignature' -Value $SignatureName -PropertyType 'String' -Force
              } 
          }
      
      }
      
      
  • Remove empty line for no AD info
    1 Posts | Last post June 14, 2017
    • Hi there, 
      
      Having issues removing the empty line should an AD record not have any information in that field. For instance if a user was missing a phone number it displays a empty line rather than moving the next line up.
      
      Any help appreciated.
      
      
  • How to do it with OWA users?
    1 Posts | Last post May 19, 2017
    • Greetings.
      Thanks Daniel for the script, it works for me with some particular modifications, but very good.
      However, how to perform this task but for users who only use OWA? Say for example those who have K1 license.
  • What about if fields in AD change? ie. new phone number
    3 Posts | Last post May 18, 2017
    • THis script just seems to create, how can we manage changes that happen in AD to recreate or update the sig files?
    • change the version number within the script and it will update users signatures but not that everyone's will not update not just selected people. 
    • I just used the last modified date of the AD User as the folder name.  Then if the AD attribute is updated it reruns the script... had to rearrange the script a little to put the AD attributes before the check, but that is a minor delay on the overall script.
      
1 - 10 of 23 Items