$ldap = TranslateName(1, @domain, 3, @ldomain+'\'+@userid, 1)
$UPs = GetObject('LDAP://'+$LDAP[0])
$FirstName = $UPs.FirstName
$MiddleName = $UPs.initials
$LastName = $UPs.LastName
$sOffice = $UPs.physicalDeliveryOfficeName
$sTitle = $UPs.Title
$sEmail = $UPs.mail
$sDepartment = $UPs.Department
$sStreetAddress = $UPs.StreetAddress
$sCity = $UPs.L
$sState = $UPs.St
$sPostalCode = $UPs.PostalCode
$sCountry = $UPs.Co
$sPhoneNumber = $UPs.telephoneNumber
$sFaxNumber = $UPs.FacsimileTelephoneNumber
$sCellNumber = $UPs.Mobile
$sWebPage = $UPs.wWWHomePage
$SigImage = 'http://www.website.com/Shared/Images_pres/Logo.PNG' ; Company Logo left side image
$BarImage = 'http://intranet/SiteCollectionImages/ChallengeLogo.png' ; Button bar graphic - right side
$BarLink = 'http://intranet/Challenge/default.aspx' ; hyperlink for button bar
$SigData = '<html><head></head><body><br><br><hr><table border="0"><tr><td align="center" valign="bottom" style="width: 200px">' +@crlf
+ '<img border=0 width=184 height=78 src="' + $SigImage + '">' +@crlf + '</td><td align="center" valign="bottom" style="width: 400px"><font face="arial" size="3">' +@crlf
+ '<b>'+$FirstName +' '+ $lastname+'</b>' +@crlf + '</font><font face="arial" size="2">' +@crlf + ' - '+$sTitle +@crlf + '<hr>' +@crlf
+ $sOffice +' - ' +@crlf +$sDepartment +'<br>' +@crlf + $sStreetAddress+'<br>' +@crlf + '$sCity,' +@crlf + '$sState' +@crlf + ' $sPostalCode <br>' +@crlf
+ $sPhoneNumber+' (Office)<br>' +@crlf + $sFaxNumber +' (Fax)<br>' +@crlf + $sEmail +'<br>' +@crlf + '</font></td>' +@crlf + '<td align="center" valign="bottom" style="width: 200px">' +@crlf
+ '<a href="' + $BarLink + '"><img border=0 width=190 height=48 src="' + $BarImage + '"</p>' +@crlf + '</tr></table><table border="0"><tr><td Width="800" align="center"><font face="arial" size="1">' +@crlf
+ 'Privacy Statement: This e-mail may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. '
+ 'If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or'
+ ' copying of this e-mail is prohibited. If you have received this in error, please reply to the sender and delete it immediately.' +@crlf
+ '</font></tr></td></table><br></body></html>'
$SigFile = ExpandEnvironmentVars(%appdata%) + '\Microsoft\Signatures\_Default.htm'
Del $SigFile
$SigData = Split($SigData, @CRLF)
$nul = WriteFile($SigFile,$SigData)