This is an awesome script. Found a few typos, few extra unused variables, and had to modify template and add a few fields, and change reg keys for outlook 2016 but so far so good. Nice work! Tested with Outlook 2016 / Windows 10.
how can i run the script with windows 10 and office 2007? the txt and the htm signature are not readable
Is possible to add a banner by url ??. A picture hanging in internet.
I made this too allow me to have a ad group that would be queried to allow some users not have there signature forced. #Forced or not OutlookSignature add or remove user form AD group OutlookSignatur e $UserName = $env:username $groupOutlook = "OutlookSignatu re" $members = Get-ADGroupMemb er -Identity $groupOutlook -Recursive | Select -ExpandProperty samAccountName If ($members -contains $UserName) { Write-Output "Setting signature for Office 2013" Remove-ItemProp erty -Name 'NewSignature' -Path HKCU:'\Software \Microsoft\Offi ce\15.0\Common\ MailSettings' Remove-ItemProp erty -Name 'ReplySignature ' -Path HKCU:'\Software \Microsoft\Offi ce\15.0\Common\ MailSettings' } Else { Write-Output "Setting signature for Office 2013 as forced" New-ItemPropert y HKCU:'\Software \Microsoft\Offi ce\15.0\Common\ MailSettings' -Name 'NewSignature' -Value 'COMAPANY NAME' -PropertyType 'String' -Force New-ItemPropert y HKCU:'\Software \Microsoft\Offi ce\15.0\Common\ MailSettings' -Name 'ReplySignature ' -Value 'COMAPANY NAME' -PropertyType 'String' -Force } i have added it in twice, start were you check versions, and and end where after creating signature. Maybe there is a way to do it once?
I solved this like this: If ($ADTelephoneNumber -ne "") { $FindText = "Telefonnummer" $ReplaceText = $ADTelephoneNum ber.ToString() } Else { $FindText = "Telefon : Telefonnummer`v " $ReplaceText = "".ToString() } `v means new line. In this way the whole line will be replaced by nothing if there is no telephone number set for a user in AD.
Has anyone a idea how i can add the correct hyperlink to the signature? For example to the E-mail-Adress or Website ?
Thats it: $MSWord.Selection.Find.Execute ($FindText, $True, $MatchWholeWord , $MatchWildcards , $MatchSoundsLik e, $MatchAllWordFo rms, $Forward, $Wrap, $Format, $ReplaceText, $ReplaceAll ) if ($MSWord.Select ion.Find.Execut e($ReplaceText. ToString())) { $MSWord.ActiveD ocument.Hyperli nks.Add($MSWord .Selection.Rang e, "mailto:"+$Repl aceText.ToStrin g(), $missing, $missing, $ReplaceText.To String())
Thanks for your script. Working great under Windows 7, but our windows 10 users are not getting anything. It seems to be this section "$ADUser = $ADUserPath.GetDirectoryEntry( )" that i get this ERROR "Cannot invoke method. Method invocation is supported only on core types in this language mode. At line:1 char:1 + $ADUser = $ADUserPath.Get DirectoryEntry( ) + ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~ + CategoryInfo : InvalidOperatio n: (:) [], RuntimeExceptio n + FullyQualifiedE rrorId : MethodInvocatio nNotSupportedIn ConstrainedLang uage" I tried to google the problem, and seen some Applocker stuff. We use AppLocker. Do you have any ideas? Thanks.
HI Wondering how you remove the ForceSignature. I can change the script to 0 but that doesnt change anything in the reg.
found it [HKEY_CURRENT_USER\Software\Mi crosoft\Office\ 14.0\Common\Mai lSettings] "NewSignature"= "Standard Signature" "ReplySignature "="Standard Signature" Thinking option to allow you to change this within the script would be great.
Hi, I want deploy this script in my AD Development, what can i do first? thank you.
I have them both running in background and nothing seems to work stopping them. The sigs are not available until a reboot..is there a graceful quit command that could be added to the script so they are available immediately?
Nevermind...I just add kill commands and it solved the issue...it left a trailing ~ word document but thats fine...