diff --git a/Manuell/Anleitung.txt b/Manuell/Anleitung.txt new file mode 100644 index 0000000..69a9357 --- /dev/null +++ b/Manuell/Anleitung.txt @@ -0,0 +1,24 @@ +Für Signatur ohne Kontaktbild: + +Ordner ohne_KontaktBild öffnen. + +Rechtsklick auf ohne_KontaktBild.ps1 Datei -> Mit Powershell ausführen + +Gesamten Inhalt der angezeigten Seite markieren und Rechtsklick kopieren. + +Neue Signatur anlegen: + +In Outlook (Classic) -> Datei -> Optionen -> E-Mail -> Signaturen -> Neu + +Im Textfeld -> Strg + V + +Speichern + +Wenn neue Signatur als Standard Signatur im Outlook gewünscht ist: + +In Outlook (Classic) -> Datei -> Optionen -> E-Mail -> Signaturen -> Neue Nachrichten -> (erstellte Signatur auswählen) + + +Für Signatur mit Kontaktbild: + +Bitte subcura kontaktieren. \ No newline at end of file diff --git a/Manuell/Base64_Admin.ps1 b/Manuell/Base64_Admin.ps1 new file mode 100644 index 0000000..d185f25 --- /dev/null +++ b/Manuell/Base64_Admin.ps1 @@ -0,0 +1,7 @@ +$ImagePath = "\\vsql01\FLOWFACT\subcura\Outlook_Signatur\mit_KontaktBild\KontaktBild.jpg" + +$Bytes = [System.IO.File]::ReadAllBytes($ImagePath) + +$Base64 = [System.Convert]::ToBase64String($Bytes) + +$Base64 | Set-Clipboard \ No newline at end of file diff --git a/Manuell/KontaktBild.JPG b/Manuell/KontaktBild.JPG new file mode 100644 index 0000000..3e5a30e Binary files /dev/null and b/Manuell/KontaktBild.JPG differ diff --git a/Manuell/mit_KontaktBild.ps1 b/Manuell/mit_KontaktBild.ps1 new file mode 100644 index 0000000..a4e2d4a --- /dev/null +++ b/Manuell/mit_KontaktBild.ps1 @@ -0,0 +1,43 @@ +$Base64 = Read-Host + +$HtmlLine = "'data:image/jpeg;base64,$Base64'" + +$UserName = $env:USERNAME + +$root = [ADSI]"LDAP://RootDSE" +$base = "LDAP://$($root.defaultNamingContext)" + +$searchRoot = [ADSI]$base + +$searcher = New-Object System.DirectoryServices.DirectorySearcher($searchRoot) +$searcher.Filter = "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$UserName))" + +$searcher.PageSize = 1 + +$result = $searcher.FindOne() + +$props = $result.Properties + +$DisplayName = $props["displayname"][0] +$Position = $props["title"][0] +$Telefon = $props["telephonenumber"][0] +$Mail = $props["mail"][0] + +# Signaturpfad +$File = "\\vsql01\FLOWFACT\subcura\Outlook_Signatur\mit_KontaktBild\WIP-Dresden GmbH.html" + +$html = Get-Content $File -Raw + +$html = $html.Replace("{BEN_AD_CONTACTPICTURE}", $HtmlLine) +$html = $html.Replace("{BEN_NAME}", $DisplayName) +$html = $html.Replace("{BEN_POSITION}", $Position) +$html = $html.Replace("{BEN_TelefonBuero}", $Telefon) +$html = $html.Replace("{BEN_email}", $Mail) + +$TempFile = "$env:TEMP\signature_preview.html" + +# schreiben +Set-Content -Path $TempFile -Value $html -Encoding UTF8 + +# anzeigen +Start-Process $TempFile \ No newline at end of file diff --git a/Manuell/ohne_KontaktBild.ps1 b/Manuell/ohne_KontaktBild.ps1 new file mode 100644 index 0000000..003ce07 --- /dev/null +++ b/Manuell/ohne_KontaktBild.ps1 @@ -0,0 +1,38 @@ +$UserName = $env:USERNAME + +$root = [ADSI]"LDAP://RootDSE" +$base = "LDAP://$($root.defaultNamingContext)" + +$searchRoot = [ADSI]$base + +$searcher = New-Object System.DirectoryServices.DirectorySearcher($searchRoot) +$searcher.Filter = "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$UserName))" + +$searcher.PageSize = 1 + +$result = $searcher.FindOne() + +$props = $result.Properties + +$DisplayName = $props["displayname"][0] +$Position = $props["title"][0] +$Telefon = $props["telephonenumber"][0] +$Mail = $props["mail"][0] + +# Signaturpfad +$File = "\\vsql01\FLOWFACT\subcura\Outlook_Signatur\ohne_KontaktBild\WIP-Dresden GmbH.html" + +$html = Get-Content $File -Raw + +$html = $html.Replace("{BEN_NAME}", $DisplayName) +$html = $html.Replace("{BEN_POSITION}", $Position) +$html = $html.Replace("{BEN_TelefonBuero}", $Telefon) +$html = $html.Replace("{BEN_email}", $Mail) + +$TempFile = "$env:TEMP\signature_preview.html" + +# schreiben +Set-Content -Path $TempFile -Value $html -Encoding UTF8 + +# anzeigen +Start-Process $TempFile \ No newline at end of file