From e204a3fe7809ef69e537d2ae5407ca33bca2c04b Mon Sep 17 00:00:00 2001 From: "gordon.zimm" Date: Wed, 20 May 2026 07:46:14 +0000 Subject: [PATCH] =?UTF-8?q?mit=5FKontaktBild.ps1=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mit_KontaktBild.ps1 | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 mit_KontaktBild.ps1 diff --git a/mit_KontaktBild.ps1 b/mit_KontaktBild.ps1 deleted file mode 100644 index a4e2d4a..0000000 --- a/mit_KontaktBild.ps1 +++ /dev/null @@ -1,43 +0,0 @@ -$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