Jump to content

Kelechi93

Members
  • Posts

    34
  • Joined

  • Last visited

Reputation

0 Neutral

About Kelechi93

Personal Information

  • Occupation
    IT Technician
  • Location
    London
  1. Would this version work on Server 2016?????
  2. Ahhh i do actually use both (make account on AD and then activate on Exchange and then Migrate to 365) - - - Updated - - - Ahhh i do actually use both (make account on AD and then activate on Exchange and then Migrate to 365)
  3. I've got a Teacher who's just got married and wanted her name changed in all her accounts so i've made her a new one which includes a new email address. Does anyone have any idea how to transfer emails from an old account to a new one?????? I'm using Exchange if that helps
  4. No network card included sir, since it's a PXE, it's a straight network boot.
  5. -- I fished around the BIOS for a little bit not sure what i was meant to be looking for, so i might have to try reset the BIOS to defaults.
  6. Here's a strange one.... I'm setting up some fresh PC's for the new term and i'm setting them up via PXE boot. One of the PC's i'm working on suddenly does the BSOD, i do a force reboot to start the process again and PXE is missing. Even after swapping SSD's i'm still getting the same problem. Any ideas?
  7. https://www.bickleyparkschool.co.uk/
  8. Signature.docx Hey sorry, the inbox for some strange reason, won't let me unload attachments so i've given you a screenshot and the word document version. Thanks again,
  9. I'm open to that, as long as i'm able get the design to scale since it's already been approved by the Head and the Marketing Manager, what would i need to do? would you like me to PM you?
  10. Signature.ps1 There you go sir.
  11. A Gentlemen and a Scholar, thanks for looking into this for me. Just to be clear, on the Active Directory side of things, i've already populated the fields, i just need it to work. I've set it up already so that the staff can't change there own signature's and only go by what we've set up for them (some teachers like to "exaggerate" there job role ). But the results i'm getting is that the script is running, but the signature is missing: That's my struggle right now and worst-case i'm thinking about changing up the code completely or seeing if someone else can spot something that i haven't
  12. -- Looks good, I've been working on a signature myself and my only struggle is execution, i've set it up as a powershell script via Group Policy to run every time a user logs in but when it gets to the desktop, it asks me to save a "Normal.dotm" word file or something like that. I was wondering if i could get a 2nd opinion? I've left my code below if you or anyone is interested: #Custom variables $SignatureName = 'Signature' $SigSource = "\\PREP-AD02\AD Resources$\Signature.docx" #Path to the *.docx file$SignatureVersion = "1.8" #Change this if you have updated the signature. If you do not change it, the script will quit after checking for the version already on the machine $ForceSignature = '1' #Set to 1 if you don't want the users to be able to change signature in Outlook #Environment variables $AppData=(Get-Item env:appdata).value $SigPath = '\Microsoft\Signatures' #Path to signatures. $LocalSignaturePath = $AppData+$SigPath $RemoteSignaturePathFull = $SigSource #Check signature path (needs to be created if a signature has never been created for the profile if (-not(Test-Path -path $LocalSignaturePath)) { New-Item $LocalSignaturePath -Type Directory} #Copy version file If (-not(Test-Path -Path $LocalSignaturePath\$SignatureVersion)) { If (Test-Path HKCU:'\Software\Microsoft\Office\16.0') { $ForceKeyPathReply = (Get-ItemProperty 'HKCU:\Software\Microsoft\Office\16.0\Common\MailSettings').ReplySignature -eq $null $ForceKeyPathNew = (Get-ItemProperty 'HKCU:\Software\Microsoft\Office\16.0\Common\MailSettings').NewSignature -eq $null If ($ForceKeyPathReply -eq $False) {Remove-ItemProperty -path 'HKCU:\Software\Microsoft\Office\14.0\Common\MailSettings' -name ReplySignature} Else {Write-Host "The reg value does not exist"} If ($ForceKeyPathNew -eq $False) {Remove-ItemProperty -path 'HKCU:\Software\Microsoft\Office\14.0\Common\MailSettings' -name NewSignature} Else {Write-Host "The reg value does not exist"} } If ($ForceSignature -eq '1') { Get-ChildItem -Path $LocalSignaturePath -Recurse | foreach {remove-item $_.fullname -recurse -force -ErrorAction SilentlyContinue} } New-Item -Path $LocalSignaturePath\$SignatureVersion -ItemType Directory } Elseif (Test-Path -Path $LocalSignaturePath\$SignatureVersion) { break } #Get Active Directory information for current user $UserName = $env:username $Filter = "(&(objectCategory=User)(samAccountName=$UserName))" $Searcher = New-Object System.DirectoryServices.DirectorySearcher $Searcher.Filter = $Filter $ADUserPath = $Searcher.FindOne() $ADUser = $ADUserPath.GetDirectoryEntry() $ADDisplayName = $ADUser.DisplayName $ADEmailAddress = $ADUser.mail $ADTitle = $ADUser.title $ADTelePhoneNumber = $ADUser.TelephoneNumber $ADModify = $ADUser.whenChanged #Copy signature templates from source to local Signature-folder Write-Output "Copying Signatures" Copy-Item "$Sigsource" $LocalSignaturePath -Recurse -Force $ReplaceAll = 2 $FindContinue = 1 $MatchCase = $False $MatchWholeWord = $True $MatchWildcards = $False $MatchSoundsLike = $False $MatchAllWordForms = $False $Forward = $True $Wrap = $FindContinue $Format = $False #Insert variables from Active Directory to rtf signature-file $MSWord = New-Object -ComObject word.application $fullPath = $LocalSignaturePath+'\'+$SignatureName+'.docx' $MSWord.Documents.Open($fullPath) #User Name $FindText = "DisplayName"$ReplaceText = $ADDisplayName.ToString()$MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord, $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap, $Format, $ReplaceText, $ReplaceAll ) #Title $FindText = "Title" $ReplaceText = $ADTitle.ToString() $MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord, $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap, $Format, $ReplaceText, $ReplaceAll ) #Email Address $FindText = "e-mail" $ReplaceText = $ADEmailAddress.ToString() $MSWord.Selection.Find.Execute($FindText, $MatchCase, $MatchWholeWord, $MatchWildcards, $MatchSoundsLike, $MatchAllWordForms, $Forward, $Wrap, $Format, $ReplaceText, $ReplaceAll ) #Save new message signature Write-Output "Saving signatures"#Save HTML $saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat], "wdFormatHTML"); $path = $LocalSignaturePath+'\'+$SignatureName+".htm" $MSWord.ActiveDocument.saveas([ref]$path, [ref]$saveFormat) #Save RTF $saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat], "wdFormatRTF"); $path = $LocalSignaturePath+'\'+$SignatureName+".rtf" $MSWord.ActiveDocument.SaveAs([ref] $path, [ref]$saveFormat) #Save TXT $saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat], "wdFormatText"); $path = $LocalSignaturePath+'\'+$SignatureName+".txt" $MSWord.ActiveDocument.SaveAs([ref] $path, [ref]$SaveFormat) $MSWord.ActiveDocument.Close() $MSWord.Quit() #Office 2016 signature If (Test-Path HKCU:Software\Microsoft\Office\16.0) { If ($ForceSignature -eq '0') { $ForceKeyPathReply = (Get-ItemProperty 'HKCU:\Software\Microsoft\Office\16.0\Common\MailSettings').ReplySignature -eq $null $ForceKeyPathNew = (Get-ItemProperty 'HKCU:\Software\Microsoft\Office\16.0\Common\MailSettings').NewSignature -eq $null If ($ForceKeyPathReply -eq $False) {Remove-ItemProperty -path 'HKCU:\Software\Microsoft\Office\16.0\Common\MailSettings' -name ReplySignature} Else {Write-Host "The reg value does not exist"} If ($ForceKeyPathNew -eq $False) {Remove-ItemProperty -path 'HKCU:\Software\Microsoft\Office\16.0\Common\MailSettings' -name NewSignature} Else {Write-Host "The reg value does not exist"} $MSWord = New-Object -comobject word.application $EmailOptions = $MSWord.EmailOptions $EmailSignature = $EmailOptions.EmailSignature $EmailSignatureEntries = $EmailSignature.EmailSignatureEntries $EmailSignature.NewMessageSignature=$SignatureName $EmailSignature.ReplyMessageSignature=$SignatureName $MSWord.Quit() } If ($ForceSignature -eq '1') { $MSWord = New-Object -comobject word.application $EmailOptions = $MSWord.EmailOptions $EmailSignature = $EmailOptions.EmailSignature $EmailSignatureEntries = $EmailSignature.EmailSignatureEntries $EmailSignature.NewMessageSignature=$SignatureName $EmailSignature.ReplyMessageSignature=$SignatureName $MSWord.Quit() If (Get-ItemProperty -Name 'NewSignature' -Path HKCU:'\Software\Microsoft\Office\16.0\Common\MailSettings') { } Else { New-ItemProperty HKCU:'\Software\Microsoft\Office\16.0\Common\MailSettings' -Name 'NewSignature' -Value $SignatureName -PropertyType 'String' -Force } If (Get-ItemProperty -Name 'ReplySignature' -Path HKCU:'\Software\Microsoft\Office\16.0\Common\MailSettings') { } Else { New-ItemProperty HKCU:'\Software\Microsoft\Office\16.0\Common\MailSettings' -Name 'ReplySignature' -Value $SignatureName -PropertyType 'String' -Force } } } -- Another thing i was wondering was is that if i decided to use your code, would i be able to implement my variables and layout on it as well or does it have to reflect your design? and is there a feature on your code that stops users from editing there own signatures? Sorry if i sound confusing
  13. I think the keyword here is "Windows 7"
  14. You're too kind, THANK YOU SO MUCH, sorry to be a bother
  15. Inside the Signature.docx file is my template of the signature itself with the variable (DisplayName Title e-mail) I've tried to put in one of the changes ($SigSource = ".\Signature.docx" #Path to the *.docx file) changing it word-for-word on the powershell script and changing the version and the script runs when i log in keep getting these kind of errors (so bizarre). I'm pretty sure that i've missed something key, i can't put my finger on it (was never good at writing scripts at university ) What's you take??????????
×
×
  • Create New...