<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>email Archives - Tech Guy Zone</title>
	<atom:link href="https://techguyzone.com/tag/email/feed/" rel="self" type="application/rss+xml" />
	<link>https://techguyzone.com/tag/email/</link>
	<description></description>
	<lastBuildDate>Sun, 08 Oct 2023 17:13:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://techguyzone.com/wp-content/uploads/2023/12/cropped-Logo-Black-32x32.png</url>
	<title>email Archives - Tech Guy Zone</title>
	<link>https://techguyzone.com/tag/email/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Company-Wide Email Signatures on Windows Server</title>
		<link>https://techguyzone.com/it-networking/company-wide-email-signatures-on-windows-server/</link>
					<comments>https://techguyzone.com/it-networking/company-wide-email-signatures-on-windows-server/#comments</comments>
		
		<dc:creator><![CDATA[TechGuy]]></dc:creator>
		<pubDate>Sun, 08 Oct 2023 16:58:21 +0000</pubDate>
				<category><![CDATA[IT & Networking]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[signature]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows server]]></category>
		<guid isPermaLink="false">https://techguyzone.com/?p=54</guid>

					<description><![CDATA[<p>Consistency in email signatures across an organization is crucial for maintaining a professional image. Manually creating and updating these signatures can be a laborious and error-prone task. This article provides all scripting for this process using PowerShell to create a CSV file on Windows Server. To see the process in action, check out my YouTube [&#8230;]</p>
<p>The post <a href="https://techguyzone.com/it-networking/company-wide-email-signatures-on-windows-server/">Company-Wide Email Signatures on Windows Server</a> appeared first on <a href="https://techguyzone.com">Tech Guy Zone</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h3 class="wp-block-heading"></h3>



<p>Consistency in email signatures across an organization is crucial for maintaining a professional image. Manually creating and updating these signatures can be a laborious and error-prone task. This article provides all scripting for this process using PowerShell to create a CSV file on Windows Server. To see the process in action, check out my YouTube video.</p>



<ul class="wp-block-social-links is-layout-flex wp-block-social-links-is-layout-flex"><li class="wp-social-link wp-social-link-youtube  wp-block-social-link"><a rel="noopener nofollow" target="_blank" href="https://youtu.be/ciKZXp0s8Uo" class="wp-block-social-link-anchor"><svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"></path></svg><span class="wp-block-social-link-label screen-reader-text">YouTube</span></a></li></ul>



<p></p>



<p><strong>PersonalizeSignature.ps1</strong></p>
</div>
</div>



<pre class="wp-block-code has-border-color has-cyan-bluish-gray-border-color has-tertiary-background-color has-background has-small-font-size" style="border-width:1px"><code>
function CreateSignature($inputFilename, $outputFilename) {
    # Define replacement strings as an array
    $replacements = @(
        @{ Name = "GivenName"; Value = "{{First Name}}" },
        @{ Name = "Surname"; Value = "{{Last Name}}" },
        @{ Name = "Department"; Value = "{{Department}}" },
        @{ Name = "Title"; Value = "{{Title}}" },
        @{ Name = "MobilePhone"; Value = "{{Mobile}}" },
        @{ Name = "homePhone"; Value = "{{Ext}}" }
    )

    # Import the CSV file from a network path
    $csvPath = ".\company.users.csv"
    $userInfo = Import-Csv -Path $csvPath

    # Get the current user's username from the environment variable
    $currentUsername = $env:USERNAME

    # Find the user's information from the CSV file
    $currentUser = $userInfo | Where-Object { $_.Username -eq $currentUsername }

    # Replace the placeholders in the HTML signature template located on the network path
    $htmlSignature = Get-Content -Path $inputFilename -Raw

    # Loop through the replacements array and replace the placeholders with the corresponding user data or an empty string if not found
    foreach ($replacement in $replacements) {
        $replacementValue = ""
        if ($replacement.Name -eq "GivenName" -and ($currentUser.Title -eq "" -or $currentUser.MobilePhone -eq "") -and $currentUser.GivenName -ne "") {
            $replacementValue = "&lt;br>$($currentUser.GivenName)"
        }
        elseif ($replacement.Name -eq "Title" -and $currentUser.Title -eq "" -and $currentUser.MobilePhone -eq "") {
            $replacementValue = "&lt;br>"
        }
        elseif ($currentUser -and $currentUser.$($replacement.Name)) {
            $replacementValue = $currentUser.$($replacement.Name)
        } elseif (-not $currentUser) {
            $replacementValue = ""
        } 

        if ($replacement.Name -eq "homePhone") {
            if ($currentUser.homePhone -eq "") {
                $replacementValue = ""
            } else {
                $replacementValue = "Ext.$($currentUser.homePhone)"
            }
        }

        $htmlSignature = $htmlSignature -replace $replacement.Value, $replacementValue
    }

    # Save the personalized HTML signature to the output file
    Set-Content -Path $outputFilename -Value $htmlSignature
}

#Create the signature
$inputFilename = "\\company.local\IT\Config\ComapnySignature.htm"
$outputFilename = "$env:APPDATA\Microsoft\Signatures\CompanySignature.htm"
CreateSignature $inputFilename $outputFilename
</code></pre>



<p></p>



<p><strong>PersonalizeSignature.vbs</strong></p>



<pre class="wp-block-code has-tertiary-background-color has-background has-small-font-size"><code>Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "powershell.exe -WindowStyle Hidden -ExecutionPolicy Bypass -File \\SERVER1\ITScripts\PersonalizeSignature.ps1", 0</code></pre>



<p></p>



<p><strong>UpdateUserInfo.vbs</strong></p>



<pre class="wp-block-code has-tertiary-background-color has-background" style="font-size:0.9rem"><code>#Define the Admin user (Not from AD)
$AdminUser = '"Administrator","Company","IT","Cloud Services","",""'

# Import the Active Directory module if not already loaded
if (!(Get-Module -Name ActiveDirectory)) {
    Import-Module ActiveDirectory
}

# Define the output CSV file path
$outputCsvPath = ".\company.users.csv"

# Get user information from Active Directory
$users = Get-ADUser -Filter * -Properties GivenName, Surname, Title, MobilePhone, homePhone, UserPrincipalName, Department

# Filter users with a UPN, remove the domain from the UPN, and export to a CSV file
$users |
Where-Object { $_.UserPrincipalName -ne $null } |
Select-Object @{Name = 'Username'; Expression = {$_.UserPrincipalName -replace '@rival.local'}},
              GivenName, Surname, Title, MobilePhone, homePhone, Department |
Export-Csv -Path $outputCsvPath -NoTypeInformation

#Add Admin User at the end
Add-Content -Path $outputCsvPath -Value $AdminUser
</code></pre>



<p></p>



<p><strong>CompanySignature.htm</strong></p>



<pre class="wp-block-code has-tertiary-background-color has-background" style="font-size:0.9rem"><code>&lt;!DOCTYPE html>
&lt;html>
&lt;head>
	&lt;meta charset="UTF-8">
	&lt;title>Company Email Signature&lt;/title>
&lt;/head>
&lt;body style="font-family: Arial, Helvetica, sans-serif;">
    &lt;div style="margin-bottom: 20pt; margin-top: 20pt;font-size: 11pt;">
        Thanks and best regards&lt;br>{{First Name}}
    &lt;/div>
    &lt;div style="margin-bottom: 5px;">
        &lt;table style="width:100%">
            &lt;tr>
                &lt;td colspan="1" style="border-top: 1px solid black;">
                &lt;/td>
            &lt;/tr>
        &lt;/table>
    &lt;/div>	
    &lt;div style="float: left; margin-right: 20px;">
        &lt;table style="border-collapse: collapse; margin: 0 auto; width: 500px; text-align: left;">
            &lt;tr>
                &lt;td style="width: 120px; vertical-align: middle; padding: 0 10px;">
                    &lt;div style="display: flex; justify-content: flex-start; align-items: center; margin-bottom: 10px;">
                        &lt;a href="https://www.mycompany.com">&lt;img width=80% src="./logo.jpeg" alt="Comapny Logo">&lt;/a>
                    &lt;/div>
                &lt;/td>
                &lt;td style="width: 250px; vertical-align: top; padding: 0px 5px;">
                    &lt;div style="text-align: center;">
                        &lt;div style="font-size: 110%;">&lt;strong>{{First Name}} {{Last Name}}&lt;/strong>&lt;/div>
                        &lt;div style="font-size: 100%; margin-bottom: 1pt;">{{Title}}&lt;/div>
                        &lt;div style="font-size: 80%; margin-bottom: 4pt;">{{Depatrment}}&lt;/div>
                        &lt;div style="font-size: 80%; margin-bottom: 6pt;">{{Mobile}}&lt;/div>
                        &lt;div style="font-size: 90%;">&lt;a href="https://www.company.com">www.company.com&lt;/a>&lt;/div>
                        &lt;div style="font-size: 80%;">Phone +1 x769 x806 3066 {{Ext}}&lt;/div>
                        &lt;div style="font-size: 80%;">Fax +1 7x69 2236 3627&lt;/div>
                    &lt;/div>
                &lt;/td>
            &lt;/tr>
        &lt;/table>
    &lt;/div>
    &lt;div style="font-style: italic; font-size: 80%; margin-top: 10px; text-align: left; line-height: 1.7; width: 100%; display: inline-block;">
        &lt;p>The content of this email is confidential and intended for the recipients 
            specified in this message only. It is strictly forbidden to share any 
            part of this message with any third party, without the agreement of the 
            originator of this email. If you received this message by mistake, 
            please forward this message to &lt;a href="mailto:companyIT@comapny.com?subject=Received%20this%20email%20by%20mistake">companyIT@comapny.com&lt;/a> and delete it 
            afterwards, so that we can ensure such a mistake does not occur in the future.
            &lt;br>&lt;br>Please care about our environment and think before you print, if you really want to use paper. We have only one earth.
        &lt;/p>
    &lt;/div>
&lt;/body>
&lt;/html>
</code></pre>
<p>The post <a href="https://techguyzone.com/it-networking/company-wide-email-signatures-on-windows-server/">Company-Wide Email Signatures on Windows Server</a> appeared first on <a href="https://techguyzone.com">Tech Guy Zone</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techguyzone.com/it-networking/company-wide-email-signatures-on-windows-server/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
