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,052 times
Add to favorites
Office
8/16/2015
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Error running script
    1 Posts | Last post October 07, 2015
    • I am getting an error right after saving signatures. We are Win 7 and Office 2013 environment. 
      Unable to find type [Microsoft.Office.Interop.Word.WdSaveFormat]: make sure that the assembly containing 
      this type is loaded.
      At C:\Users\jerry\Downloads\set_outlook_signature1\outlook_signature.ps1:158 char:1
      + $saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat], "wdFor ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidOperation: (Microsoft.Offic...rd.WdSaveFormat:TypeName) [], RuntimeExce 
         ption
          + FullyQualifiedErrorId : TypeNotFound
       
      
  • Hi Am getting the following error after everything is done in powershell, can some one tell me please what it is about? thanks
    2 Posts | Last post August 27, 2015
    • 
      Get-ItemProperty : Cannot find path 'HKCU:\Software\Microsoft\Office\15.0\Common\MailSettings' because it does not
      exist.
      At line:15 char:9
      +     If (Get-ItemProperty -Name 'NewSignature' -Path HKCU:'\Software\Microsoft\Of ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (HKCU:\Software\...on\MailSettings:String) [Get-ItemProperty], ItemNotFo
         undException
          + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand
      
      New-ItemProperty : Cannot find path 'HKCU:\Software\Microsoft\Office\15.0\Common\MailSettings' because it does not
      exist.
      At line:17 char:5
      +     New-ItemProperty HKCU:'\Software\Microsoft\Office\15.0\Common\MailSettings'  ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (HKCU:\Software\...on\MailSettings:String) [New-ItemProperty], ItemNotFo
         undException
          + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.NewItemPropertyCommand
      
      Get-ItemProperty : Cannot find path 'HKCU:\Software\Microsoft\Office\15.0\Common\MailSettings' because it does not
      exist.
      At line:19 char:9
      +     If (Get-ItemProperty -Name 'ReplySignature' -Path HKCU:'\Software\Microsoft\ ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (HKCU:\Software\...on\MailSettings:String) [Get-ItemProperty], ItemNotFo
         undException
          + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand
      
      New-ItemProperty : Cannot find path 'HKCU:\Software\Microsoft\Office\15.0\Common\MailSettings' because it does not
      exist.
      At line:21 char:5
      +     New-ItemProperty HKCU:'\Software\Microsoft\Office\15.0\Common\MailSettings'  ...
      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo  
    • The problem was solved as the path was not accessible. 
  • Setting as Default
    2 Posts | Last post August 27, 2015
    • Hi,
      
      Your script is very good and saved me a lot of work.
      
      But since I needed to be able to set the new signature as default (not forcing), I changed a bit the script, adding this lines so it makes the signature as the default one ;)
      
      As some people may need I put the lines I added here:
      
      $EmailSignature.NewMessageSignature = "SignatureName"  #insert the signature name
      $EmailSignature.ReplyMessageSignature = "SignatureName"  #insert the signature name
      $MSWord.Quit
      
      You must replace the SignatureName with the name you choosen on the beginning of the script ;)
    • Hi, Can you please tell me in which line to put this code to set the signature default for Outlook new and reply e-mails? Thanks
21 - 23 of 23 Items