├── Package
└── install.intunewin
├── Source
├── Signatures
│ ├── Default signature.txt
│ ├── Default signature without mobile.txt
│ ├── Default signature_files
│ │ ├── image001.png
│ │ ├── image002.png
│ │ ├── image003.png
│ │ ├── image004.png
│ │ ├── themedata.thmx
│ │ ├── colorschememapping.xml
│ │ └── filelist.xml
│ ├── Default signature without mobile_files
│ │ ├── image001.png
│ │ ├── image002.png
│ │ ├── image003.png
│ │ ├── image004.png
│ │ ├── themedata.thmx
│ │ ├── colorschememapping.xml
│ │ └── filelist.xml
│ ├── Default signature without mobile.htm
│ └── Default signature.htm
├── uninstall.ps1
└── install.ps1
├── LICENSE
└── README.md
/Package/install.intunewin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Package/install.intunewin
--------------------------------------------------------------------------------
/Source/Signatures/Default signature.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature.txt
--------------------------------------------------------------------------------
/Source/Signatures/Default signature without mobile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature without mobile.txt
--------------------------------------------------------------------------------
/Source/Signatures/Default signature_files/image001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature_files/image001.png
--------------------------------------------------------------------------------
/Source/Signatures/Default signature_files/image002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature_files/image002.png
--------------------------------------------------------------------------------
/Source/Signatures/Default signature_files/image003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature_files/image003.png
--------------------------------------------------------------------------------
/Source/Signatures/Default signature_files/image004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature_files/image004.png
--------------------------------------------------------------------------------
/Source/Signatures/Default signature_files/themedata.thmx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature_files/themedata.thmx
--------------------------------------------------------------------------------
/Source/Signatures/Default signature without mobile_files/image001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature without mobile_files/image001.png
--------------------------------------------------------------------------------
/Source/Signatures/Default signature without mobile_files/image002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature without mobile_files/image002.png
--------------------------------------------------------------------------------
/Source/Signatures/Default signature without mobile_files/image003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature without mobile_files/image003.png
--------------------------------------------------------------------------------
/Source/Signatures/Default signature without mobile_files/image004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature without mobile_files/image004.png
--------------------------------------------------------------------------------
/Source/Signatures/Default signature without mobile_files/themedata.thmx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jseerden/IntuneEmailSignatureManagement/HEAD/Source/Signatures/Default signature without mobile_files/themedata.thmx
--------------------------------------------------------------------------------
/Source/Signatures/Default signature_files/colorschememapping.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Source/Signatures/Default signature without mobile_files/colorschememapping.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Source/Signatures/Default signature_files/filelist.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Source/Signatures/Default signature without mobile_files/filelist.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Source/uninstall.ps1:
--------------------------------------------------------------------------------
1 | # Get all signature files in the Win32 app package
2 | $signatureFiles = Get-ChildItem -Path "$PSScriptRoot\Signatures"
3 |
4 | # Figure out the signature name and delete the corresponding items from the $env:APPDATA\Microsoft\Signatures folder
5 | foreach ($signatureFile in $signatureFiles) {
6 | if ($signatureFile.getType().Name -eq 'DirectoryInfo') {
7 | $signatureName = $signatureFile.Name.Split("_")[0]
8 | Remove-Item -Path "$($env:APPDATA)\Microsoft\Signatures\$($signatureName)_files" -Recurse -Force
9 | Remove-Item -Path "$($env:APPDATA)\Microsoft\Signatures\$($signatureName).htm" -Force
10 | Remove-Item -Path "$($env:APPDATA)\Microsoft\Signatures\$($signatureName).rtf" -Force
11 | Remove-Item -Path "$($env:APPDATA)\Microsoft\Signatures\$($signatureName).txt" -Force
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 John Seerden
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Intune Email Signature Manager for Outlook
2 |
3 | This Intune Win32 app queries Azure Active Directory as the signed in user and creates Signatures in Outlook for the user.
4 |
5 | ## Requirements
6 | - Requires Windows 10 Azure AD Joined devices managed with Microsoft Intune.
7 | - Application must be deployed to run in **User** context.
8 |
9 | * The app leverages the -AccountId parameter of the Connect-AzureAD cmdlet for Single Sign-On. Please note that this has only been tested on Azure AD Joined devices.
10 |
11 | ## How does it work?
12 | 1. Replace or update the files in the **Source\Signatures** folders with one or more Signature template(s) you would like to use. For example you can create a Signature in Outlook and obtain the files from %APPDATA%\Microsoft\Signatures.
13 |
14 | 2. Modify the Signature files to include placeholder values. Supported placeholder values for the templates are listed below. *Note: It is important that the actual values are available on the Azure AD user, either managed from Active Directory or directly in Office 365 / Azure AD.*
15 |
16 | 3. Package the source folder with the Microsoft Win32 Content Prep Tool, for example:
17 | `IntuneWinAppUtil.exe -c '.\Source' -s '.\Source\install.ps1' -o '.\Package'`
18 |
19 | 4. Deploy the .intunewin app with Microsoft Intune to your users!
20 |
21 | ## Supported placeholder values
22 |
23 | - %DisplayName%
24 | - %GivenName%
25 | - %Surname%
26 | - %Mail%
27 | - %Mobile%
28 | - %TelephoneNumber%
29 | - %JobTitle%
30 | - %Department%
31 | - %City%
32 | - %Country%
33 | - %StreetAddress%
34 | - %PostalCode%
35 | - %Country%
36 | - %State%
37 | - %PhysicalDeliveryOfficeName%
38 |
39 | ## Deploying the Win32 app
40 |
41 | ### Install command
42 | `PowerShell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "install.ps1"`
43 |
44 | ### Uninstall command
45 | `PowerShell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -File "uninstall.ps1"`
46 |
47 | ### Install behavior
48 | User
49 |
50 | ## Detection rules
51 | - Manually configure detection rules
52 |
53 | Example:
54 | - Rule type: File
55 | - Path: %APPDATA%\Microsoft\Signatures
56 | - File or folder: Default signature.htm
57 | - Detection method: File or folder exists
58 |
59 | You can change the signature's display name in Outlook by changing the file names in the **Source\Signatures** folder. Make sure to translate the changes into the detection rules!
60 |
--------------------------------------------------------------------------------
/Source/install.ps1:
--------------------------------------------------------------------------------
1 | # Win32 app runs PowerShell in 32-bit by default. AzureAD module requires PowerShell in 64-bit, so we are going to trigger a rerun in 64-bit.
2 | if ($env:PROCESSOR_ARCHITEW6432 -eq "AMD64") {
3 | try {
4 | & "$env:WINDIR\SysNative\WindowsPowershell\v1.0\PowerShell.exe" -File $PSCommandPath
5 | }
6 | catch {
7 | throw "Failed to start $PSCommandPath"
8 | }
9 | exit
10 | }
11 |
12 | Start-Transcript -Path "$($env:TEMP)\IntuneSignatureManagerForOutlook-log.txt" -Force
13 |
14 | # Install NuGet Package Provider
15 | Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Scope CurrentUser -Force
16 |
17 | # Install AzureAD module to retrieve the user information
18 | Install-Module -Name AzureAD -Scope CurrentUser -Force
19 |
20 | # Leverage Single Sign-on to sign into the AzureAD PowerShell module
21 | $userPrincipalName = whoami -upn
22 | Connect-AzureAD -AccountId $userPrincipalName
23 |
24 | # Get the user information to update the signature
25 | $userObject = Get-AzureADUser -ObjectId $userPrincipalName
26 |
27 | # Create signatures folder if not exists
28 | if (-not (Test-Path "$($env:APPDATA)\Microsoft\Signatures")) {
29 | $null = New-Item -Path "$($env:APPDATA)\Microsoft\Signatures" -ItemType Directory
30 | }
31 |
32 | # Get all signature files
33 | $signatureFiles = Get-ChildItem -Path "$PSScriptRoot\Signatures"
34 |
35 | foreach ($signatureFile in $signatureFiles) {
36 | if ($signatureFile.Name -like "*.htm" -or $signatureFile.Name -like "*.rtf" -or $signatureFile.Name -like "*.txt") {
37 | # Get file content with placeholder values
38 | $signatureFileContent = Get-Content -Path $signatureFile.FullName
39 |
40 | # Replace placeholder values
41 | $signatureFileContent = $signatureFileContent -replace "%DisplayName%", $userObject.DisplayName
42 | $signatureFileContent = $signatureFileContent -replace "%GivenName%", $userObject.GivenName
43 | $signatureFileContent = $signatureFileContent -replace "%Surname%", $userObject.Surname
44 | $signatureFileContent = $signatureFileContent -replace "%Mail%", $userObject.Mail
45 | $signatureFileContent = $signatureFileContent -replace "%Mobile%", $userObject.Mobile
46 | $signatureFileContent = $signatureFileContent -replace "%TelephoneNumber%", $userObject.TelephoneNumber
47 | $signatureFileContent = $signatureFileContent -replace "%JobTitle%", $userObject.JobTitle
48 | $signatureFileContent = $signatureFileContent -replace "%Department%", $userObject.Department
49 | $signatureFileContent = $signatureFileContent -replace "%City%", $userObject.City
50 | $signatureFileContent = $signatureFileContent -replace "%Country%", $userObject.Country
51 | $signatureFileContent = $signatureFileContent -replace "%StreetAddress%", $userObject.StreetAddress
52 | $signatureFileContent = $signatureFileContent -replace "%PostalCode%", $userObject.PostalCode
53 | $signatureFileContent = $signatureFileContent -replace "%Country%", $userObject.Country
54 | $signatureFileContent = $signatureFileContent -replace "%State%", $userObject.State
55 | $signatureFileContent = $signatureFileContent -replace "%PhysicalDeliveryOfficeName%", $userObject.PhysicalDeliveryOfficeName
56 |
57 | # Set file content with actual values in $env:APPDATA\Microsoft\Signatures
58 | Set-Content -Path "$($env:APPDATA)\Microsoft\Signatures\$($signatureFile.Name)" -Value $signatureFileContent -Force
59 | } elseif ($signatureFile.getType().Name -eq 'DirectoryInfo') {
60 | Copy-Item -Path $signatureFile.FullName -Destination "$($env:APPDATA)\Microsoft\Signatures\$($signatureFile.Name)" -Recurse -Force
61 | }
62 | }
63 |
64 | Stop-Transcript
65 |
--------------------------------------------------------------------------------
/Source/Signatures/Default signature without mobile.htm:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
14 |
16 |
28 |
30 |
32 |
653 |
708 |
731 |
732 |
733 |
734 |
735 |
736 |
737 |
740 |
741 | |
742 | %DisplayName%
747 | |
748 |
749 |
750 | |
751 | %JobTitle%
755 | |
756 |
757 |
758 | |
760 |
763 | |
764 |
765 |
766 | |
767 | 
803 | |
804 |
805 |
807 |
808 | |
809 | T:
811 | %TelephoneNumber%
814 | |
815 |
816 |
817 | |
818 |
819 |
820 | |
821 | %Mail%
823 | |
824 |
825 |
826 | |
827 | %StreetAddress%,
829 | %PostalCode% %City%, %Country%
832 | |
833 |
834 |
835 | |
836 |
884 | |
885 |
886 |
887 | |
888 |
889 |
890 | |
892 |
895 | |
896 |
897 |
898 |
899 |
900 |
901 |
902 |
903 |
904 |
905 |
906 |
907 |
908 |
--------------------------------------------------------------------------------
/Source/Signatures/Default signature.htm:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
26 |
27 |
29 |
650 |
705 |
728 |
729 |
730 |
731 |
732 |
733 |
734 |
737 |
738 | |
739 | %DisplayName%
744 | |
745 |
746 |
747 | |
748 | %JobTitle%
752 | |
753 |
754 |
755 | |
757 |
760 | |
761 |
762 |
763 | |
764 | 
798 | |
799 |
800 |
802 |
803 | |
804 | T:
806 | %TelephoneNumber%
809 | |
810 |
811 |
812 | |
813 | M: %Mobile%
817 | |
818 |
819 |
820 | |
821 | %Mail%
823 | |
824 |
825 |
826 | |
827 | %StreetAddress%,
829 | %PostalCode% %City%, %Country%
832 | |
833 |
834 |
835 | |
836 |
878 | |
879 |
880 |
881 | |
882 |
883 |
884 | |
886 |
889 | |
890 |
891 |
892 |
893 |
894 |
895 |
896 |
897 |
898 |
899 |
900 |
901 |
902 |
--------------------------------------------------------------------------------