| Windows Server 2008 R2 | Yes |
| Windows Server 2008 | Yes |
| Windows Server 2003 | Yes |
| Windows 7 | Yes |
| Windows Vista | Yes |
| Windows XP | Yes |
| Windows 2000 | No |
|
|
the script worked great once I did a find and replace of all of the single and double quotes throughout it. there are ' and " quotes paired with the 6 and 9 shaped curly quotes all though the script. Once that was done, I added things like mobile, fax (facsimileTelephoneNumber), street address, etc to the script and my signatures, worked very well except that when the script parses out the docx into an HTML, anything that is a hyperlink is converted to Times New Roman, which is no good for my signatures.
hi, i recieved the following error when i try to run the command on powershell. PS C:\Users\Administrator> {Set-ItemProper ty $CompanyRegPath '\Outlook Signature Settings' -name ForcedSignature New -Value $ForceSignature New} Set-ItemPropert y $CompanyRegPath '\Outlook Signature Settings' -name ForcedSignature New -Value $ForceSignature New PS C:\Users\Admini strator> PS C:\Users\Admini strator> if ($ForcedSignatu reReplyForward -eq $ForceSignature ReplyForward){} PS C:\Users\Admini strator> else The term 'else' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:5 + else <<<< + CategoryInfo : ObjectNotFound: (else:String) [], CommandNotFound Exception + FullyQualifiedE rrorId : CommandNotFound Exception
Hi Jan I've changed and implemented the script for test, an production on some users, so the signature file is updated every time the users is logged on. But i've had many issues in my helpdesk about different errors when users is starting outlook right after logon. I've tried executing the following lines on my Windows 7 Client. $MSWord = New-Object -com word.application $fullPath = $LocalSignature Path+"\"+$Compa nyName+".docx" $MSWord.Documen ts.Open($fullPa th) When i execute the last line to open the .docx document i've noticed it starts outlook.exe ....? I'm guessing its something about the word.applicatio n COM Object but i dont get it? Does anyone else have similar problems? Regards Simon
Hi, This is a wonderful script, but I report an error that I was shown in the following line: #Stamp registry-values for Outlook Signature Settings if they doesn`t match the initial script variables. Note that these will apply after the second script run when changes are made in the "Custom variables"-section. if ($ForcedSignatu reNew -eq $ForceSignature New){} I wonder if this correct or should be as follows: #Stamp registry-values for Outlook Signature Settings if they doesn`t match the initial script variables. Note that these will apply after the second script run when changes are made in the "Custom variables"-sect ion. if ($ForcedSignatu reNew -eq $ForceSignature New){} Tks.
Same for: #Insert variables from Active Directory to txt signature-file (Get-Content $LocalSignaturePath'\'$Company Name'.txt') | Foreach-Object {$_ -replace "DisplayName", $ADDisplayName -replace "Title", $ADTitle -replace "TelePhoneNumbe r", $ADTelePhoneNum ber -replace "EmailAddress", $ADEmailAddress } | Set-Content $LocalSignature Path'\'$Company Name'.txt' Should be: #Insert variables from Active Directory to txt signature-file (Get-Content $LocalSignature Path'\'$Company Name'.txt') | Foreach-Object {$_ -replace "DisplayName", $ADDisplayName -replace "Title", $ADTitle -replace "TelePhoneNumbe r", $ADTelePhoneNum ber -replace "EmailAddress", $ADEmailAddress } | Set-Content $LocalSignature Path'\'$Company Name'.txt' -- I have 2 problem now: - The logo used in the template wont appear (empty square) - Even enforced, the sign are not applied by default Outlook 2003 on 2008 R2 RDS
The script has been improved by Darren Kattan, and are now re-published. For information about the improvements, see the following blog-post: http://www.immense.net/deployi ng-unified-emai l-signature-tem plate-outlook Thanks Darren!
A snappy script indeed! However I am struggling how to load the correct office assembly that the script is looking for. I am running Office 2007 (x86) on a Win7 x64 platform. The errors that I recieve relate to the $saveFormat routines. ------------------------------ --------------- --------------- --------------- ----- Unable to find type [Microsoft.Offi ce.Interop.Word .WdSaveFormat]: make sure that the assembly containing this type is loaded. At C:\temp\EmailSi gnature2011\Set -OutlookSignatu rev2.ps1:173 char:73 + $saveFormat = [Enum]::Parse([ Microsoft.Offic e.Interop.Word. WdSaveFormat] <<<< , “wdFormatHTML”) ; + CategoryInfo : InvalidOperatio n: (Microsoft.Offi c...rd.WdSaveFo rmat:String) [], RuntimeExceptio n + FullyQualifiedE rrorId : TypeNotFound [ref] cannot be applied to a variable that does not exist. At C:\temp\EmailSi gnature2011\Set -OutlookSignatu rev2.ps1:180 char:59 + $MSWord.ActiveD ocument.saveas( [ref]$path, [ref]$saveForma t <<<< ) + CategoryInfo : InvalidOperatio n: (saveFormat:Tok en) [], RuntimeExceptio n + FullyQualifiedE rrorId : NonExistingVari ableReference --------------- --------------- --------------- --------------- --------------- --------- Any hints appreciated!
You could try to download and install the Primary Interop Assemblies for Office 2007 to see if that resolves the issue.
Doh! Worked out what my issue was... Even though I had all the Pre-Reqs installed for office etc (note x86 Office, x64 Win7 OS), the script was unable to find the interop libraries because I was running/testing the script from the native 64-bit powershell editor. The same errors occured when testing my script via a BAT file from the native cmd.exe As soon as I opened the x86 powershell_ise.exe from "C:\Windows\Sys WOW64\WindowsPo werShell\v1.0" and ran the script from there it worked. Similarly, opening x86 CMD.exe from "C:\Windows\Sys WOW64\" and running my batch file worked as well. Obviously having a x86 installion of office caused the issue. Since im going to deploy this script via SCCM, this wont be a problem for me as SCCM is a 32bit application, so will trigger the 32bit powershell exe. I hope someone thats having a similar issue to me stumbles across my post and finds the answer alot faster than I did Thanks again for an awesome script guys! - Scott.
I was wondering if there was a way to add the fax lines to the script. we have some people with their own personal faxes?
Magnus: You can use $ADUser.facsimileTelephoneNumb er if the fax-number is defined in Active Directory.
how can i turn off the check for last updated so it will run the full script each time its run?
You can remove the following lines to disable the version check: 109 110 111 167
excellent thanks. the other issue i'm getting is running the script from a normal user account. i'm using the vbscript to call the powershell script file but i get the error *.ps1 cannot be loaded because the execution of scripts is disabled on this system. under my admin account the executionpolicy is set to unrestricted but checking user my normal user account it says restricted. if i put this script in a gpo to run at login it wont run because of this. is there a fix for this? even if i can set for all users the executionpolicy to unrestricted would do the trick but even if i try that from an elevated powershell it complains that i don't have access to the reg key. HKLM\software\microsoft\powers hell\1\shellids \microsoft.powe rshell. any help would be appreciated. regards
You could either configure the exectuion policy via GPO (User Configuration) or alternatively launch powershell.exe with the parameter -executionpolicy bypass
if anyone wants to change it to check when the users account was updated last instead of when the signature template file was last modified. add in "$ADMofidy = $ADUser.whenChanged" with the rest of your ad variables. change "$SigVersion = (gci $RemoteSignatur ePathFull).Last WriteTime" to be "$SigVersion = $ADMofidy" leave everything else and your script will check when the user account was last updated.
i was wondering if there was an quick and easy way to remove signatures? i'm running multiple sigs and i can get it to create another sig but its not setting it as default. if setting at default works it wouldn't be too much of a problem but it would still be nice to remove the sig to keep it clean and not have too many options there for the user. i did just have a brainwave i could have the same doc name so the new sig overwrites it.