Jump to content

BrettH

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by BrettH

  1. Let me first explain that my post on Sept 8th was all about a script for creating OWA signatures. It does not have anything to do with the Outlook Signature template running from the domain. The OWA signature script should be run anytime a new user is added or anytime you just want to make sure that signatures are accurate. I'm sorry, I don't really have an answer for you regarding your two points, but I'll make a couple suggestions . On point one, I would just say to make sure that the only thing in the signature folder is the template that you want them to use. If you put anything else in there, the script basically copies the whole directory to the user's profile. There might be some complication there if you have anything besides the template file (I.E., backup folders/files). For point two, perhaps you need to specify in your group policy settings to make it wait for the scripts to complete before ending (Synchronous). It might be terminating too soon and thus not completing the script. Kind Regards, Brett
  2. Hello adamj84, I would have responded earlier, but did not receive notification. Here's what I did. This is extracted from the Set-OutlookSignature.ps1 script that I use. This is an example of how I removed a cell phone number from the Signature template file, a .docx file created in Word 2010. This is from the part of the script where it's looking for text matches to replace with the valid info. $ADMobile is defined earlier in the script as "$ADMobile = $ADUser.mobile" (without the quotes). ###Begin Code### #If a Cell number exists for the end user, add it to their signature. Otherwise, remove the Cell line from the template. if ($ADMobile -ne $null) { $FindText = "mobileNumber" $ReplaceText = $ADMobile.ToString() $MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord, $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap, $Format, $ReplaceText, $ReplaceAll ) } else { $FindText = "Cell: mobileNumber" $ReplaceText = "^p" $MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord, $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap, $Format, $ReplaceText, $ReplaceAll ) $FindText = "^p^p" $ReplaceText = "" $MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord, $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap, $Format, $ReplaceText, $ReplaceAll ) } ###End Code### The above code will look in the .docx file for a line with text "Cell: mobileNumber" and remove it if it doesn't an associated value. Kind Regards, Brett
  3. Hello everyone! First, I'd just like to pass my thanks to TheScarfedOne and the creator(s) of the scripts listed here. This was a huge help in setting up Outlook and OWA signatures for my company. Since TheScarfedOne never posted his next post about creating individual OWA signature files, I thought that I'd share mine with everyone. The script below is customized for my company. It takes into account whether or not a user has a Cell number, Fax Number, both, or neither and applies that to a custom signature. It is also setup to only work if the user has an email address and an enabled account. This script does not contain a logo, but at the bottom, I've shown how to add one. Please pardon my crude coding. Also, I got this script from https://4sysops.com/archives/add-a-signature-to-office-365-emails-with-powershell/#create-an-office-365-signature and modified it to my liking. [bEGIN CODE] #import the active directory module which is needed for Get-ADUser import-module activedirectory #set folder location for files, the folder must already exist $save_location = 'c:\Signatures\' #$users = Get-ADUser -filter * -searchbase "OU=Testing,OU=Staff,OU=Test Users,DC=bigcheese,DC=com" -Properties * -Credential bigcheese\admin -Server bigcheese.com $users = Get-ADUser -filter {(EmailAddress -like "*") -and (Enabled -eq "True")} -searchbase "OU=SomeOU,DC=YourDomain,DC=com" -Properties * foreach ($user in $users) { $account_name = "$($User.sAMAccountName)" $full_name = "$($user.GivenName) $($User.sn)$($User.extensionAttribute1)" $job_title = "$($User.title)" $comp = "$($User.company)" $phone = "$($User.telephoneNumber)" $mobile = "$($User.mobile)" $fax = "$($User.facsimileTelephoneNumber)" $email = "$($User.emailaddress)" $street = "$($User.streetAddress)" $city = "$($User.l)" $state = "$($User.st)" $zipcode = "$($User.postalCode)" $mobileyes = "$($Null)" $faxyes = "$($Null)" $mobileAndFax = "$($Null)" $noMobileOrFax = "$($Null)" if ($mobile) {$mobileyes = "1"} else {} if ($fax) {$faxyes = "2"} else {} if ($mobileyes+$faxyes -eq "12") {$mobileAndFax = "3"} else {} if ($mobileyes+$faxyes -eq "") {$noMobileOrFax = "4"} else {} if ($MobileAndFax -eq "3") { #We need to construct and write the html signature file $output_file = $save_location + $account_name + ".htm" Write-Host "Now attempting to create signature html file for " $full_name "<span style=`"font-family: calibri,sans-serif;`"><strong>" + $full_name + "</strong><br />", $job_title + "<br />", "<a href=`"http://www.somewebsite.com`" target=`"_blank`">$comp</a>" + "<br />", $street + "<br />", $city + ", " + $state + ", " + $zipcode + "<br />", "<span style=`"font-weight: bold;`">" + "Ph:" + "</span>" + " " + $phone + "<br />", "<span style=`"font-weight: bold;`">" + "Cell:" + "</span>" + " " + $mobile + "<br />", "<span style=`"font-weight: bold;`">" + "Fax:" + "</span>" + " " + $fax + "<br />", "<a href=`"mailto: $Email`">$Email</a>" + "<br />", "</span><br />" | Out-File $output_file } elseif ($mobileYes -eq "1") { #We need to construct and write the html signature file $output_file = $save_location + $account_name + ".htm" Write-Host "Now attempting to create signature html file for " $full_name "<span style=`"font-family: calibri,sans-serif;`"><strong>" + $full_name + "</strong><br />", $job_title + "<br />", "<a href=`"http://www.somewebsite.com`" target=`"_blank`">$comp</a>" + "<br />", $street + "<br />", $city + ", " + $state + ", " + $zipcode + "<br />", "<span style=`"font-weight: bold;`">" + "Ph:" + "</span>" + " " + $phone + "<br />", "<span style=`"font-weight: bold;`">" + "Cell:" + "</span>" + " " + $mobile + "<br />", "<a href=`"mailto: $Email`">$Email</a>" + "<br />", "</span><br />" | Out-File $output_file } elseif ($faxyes -eq "2") { #We need to construct and write the html signature file $output_file = $save_location + $account_name + ".htm" Write-Host "Now attempting to create signature html file for " $full_name "<span style=`"font-family: calibri,sans-serif;`"><strong>" + $full_name + "</strong><br />", $job_title + "<br />", "<a href=`"http://www.somewebsite.com`" target=`"_blank`">$comp</a>" + "<br />", $street + "<br />", $city + ", " + $state + ", " + $zipcode + "<br />", "<span style=`"font-weight: bold;`">" + "Ph:" + "</span>" + " " + $phone + "<br />", "<span style=`"font-weight: bold;`">" + "Fax:" + "</span>" + " " + $fax + "<br />", "<a href=`"mailto: $Email`">$Email</a>" + "<br />", "</span><br />" | Out-File $output_file } elseif ($NoMobileOrFax -eq "4") { #We need to construct and write the html signature file $output_file = $save_location + $account_name + ".htm" Write-Host "Now attempting to create signature html file for " $full_name "<span style=`"font-family: calibri,sans-serif;`"><strong>" + $full_name + "</strong><br />", $job_title + "<br />", "<a href=`"http://www.somewebsite.com`" target=`"_blank`">$comp</a>" + "<br />", $street + "<br />", $city + ", " + $state + ", " + $zipcode + "<br />", "<span style=`"font-weight: bold;`">" + "Ph:" + "</span>" + " " + $phone + "<br />", "<a href=`"mailto: $Email`">$Email</a>" + "</span><br />" | Out-File $output_file } else {} } [END CODE] If you want to add a logo to your signature, add logo variable like: $logo = "$($User.wWWHomePage)" Then, in each Active Directory user account, use the Webpage field to put a path to a logo (the full path) like: http://www.somewebsite.com/images/companylogo.png Lastly, towards the end of each of the "<span style=" lines after the email section ("<a href=`"mailto: $Email`">$Email</a>"), add this: , "<img alt=`"Corporate Logo`" border=`"0`" height=`"108`" src=`"" + $logo + "`" width=`"173`" />", "</span><br />" | Out-File $output_file Adjust the height and width to the size of your logo. To add the newly created signature files to OWA, run the following code in a ps1 file in Exchange Management Shell: [bEGIN CODE] $mailboxes = Get-Mailbox $mailboxes| foreach {$file= "C:\signatures" + ($_.alias) + ".htm"; Set-MailboxMessageConfiguration -identity $_.alias -SignatureHtml "$(Get-Content -Path $file -ReadCount 0)" -autoaddsignature $true } [END CODE] Hope this helps!
  4. According to this webpage, the first error suggests that there is a lot of I/O activity on the C: disk. This in turn keeps VSS from being able to run. They reference this MS Technet page that attempts to help you troubleshoot the VSS error.
  5. "Have you tried turning it off and on again?" I just had to say it. :-) Seriously though. After that, I would look for some odd-ball software that might be causing it. It could also be your group policy refresh times causing it.
  6. You are correct! Here are the specs for that card (Click the Specs tab). Integrated dual-link DVI output with HDCP11 Max resolution: 2560x1600 Integrated DisplayPort output Max resolution: 2560x1600 HDMI® (With 3D, Deep Color and x.v.Color™) Max resolution: 1920x1200 Integrated VGA output Max resolution: 2048x1536 4K refers to one of two high definition resolutions: 3840 x 2160 pixels or 4096 x 2160 pixels.
  7. One way I've found to test the SYSVOL/GPO permissions is to perform a complete backup of your GPO's. This will usually tell you if something's wrong and give you a chance to fix it. What happens if you create a new GPO? Can you save the settings there?
  8. When using LAPS, as far as I understand it, the local administrator password is set in the properties of the domain computer account (attribute editor area). So, all you need is ADUC with sufficient rights and you'll be able to quickly find the local administrator password. When preparing LAPS, schema modifications are done. It is these schema modifications that make it possible to store the local administrator password in Active Directory.
×
×
  • Create New...