PowerShell logon scripts are the recommended method for most environments.
They support dynamic user data pulled from Active Directory, making it possible to deploy a signature containing each user’s name, title, and phone number without any manual input per employee.
Step 1: Create your signature template files
Create 3 versions of your signature file:
CompanySignature.htm(HTML, the primary Outlook format)CompanySignature.rtf(Rich Text)CompanySignature.txt(plain text fallback)
Use placeholder strings inside the .htm file for user-specific fields:
<p><strong>%%DisplayName%%</strong><br>
%%Title%%<br>
%%PhoneNumber%%<br>
%%Email%%</p>
Store all 3 files on a UNC path accessible to all domain users, for example \\FileServer\Signatures\.
Step 2: Write the PowerShell logon script
# Pull user attributes from Active Directory
$user = Get-ADUser -Identity $env:USERNAME `
-Properties DisplayName, Title, telephoneNumber, mail
# Set the signature destination folder
$sigFolder = "$env:APPDATA\Microsoft\Signatures"
if (-not (Test-Path $sigFolder)) {
New-Item -ItemType Directory -Path $sigFolder | Out-Null
}
# Copy template and replace placeholders with user data
$template = Get-Content "\\FileServer\Signatures\CompanySignature.htm" -Raw
$template = $template -replace '%%DisplayName%%', ($user.DisplayName ?? '')
$template = $template -replace '%%Title%%', ($user.Title ?? '')
$template = $template -replace '%%PhoneNumber%%', ($user.telephoneNumber ?? '')
$template = $template -replace '%%Email%%', ($user.mail ?? '')
$template | Set-Content "$sigFolder\CompanySignature.htm" -Encoding UTF8
# Repeat the copy-and-replace steps for .rtf and .txt versions
# Assign the signature in Outlook via registry
$regPath = "HKCU:\Software\Microsoft\Office\16.0\Common\MailSettings"
if (-not (Test-Path $regPath)) { New-Item -Path $regPath -Force | Out-Null }
Set-ItemProperty -Path $regPath -Name "NewSignature" -Value "CompanySignature"
Set-ItemProperty -Path $regPath -Name "ReplySignature" -Value "CompanySignature"
Adjust 16.0 for your Office version: 15.0 = Office 2013, 16.0 = Office 2016/2019/2021/Microsoft 365 Apps.
Step 3: Deploy the script via Group Policy
- Open Group Policy Management Console (GPMC)
- Create or edit a GPO linked to the OU containing your target users
- Navigate to: User Configuration > Windows Settings > Scripts > Logon
- Add the script — either the
.ps1directly, or a.batwrapper:
powershell.exe -ExecutionPolicy Bypass -NonInteractive -File "\\FileServer\Scripts\SetSignature.ps1"
- Run
gpupdate /forceon a test machine to validate
The script runs at each user login. Signature updates take effect the next time each user logs on.

