Simplify add-in registration to browser sideload only
Remove Exchange PowerShell option. Outlook add-ins are registered per Microsoft 365 account via browser sideload. Each user must add the add-in once - it then works on all their devices. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4bea737696
commit
33707bdb44
|
|
@ -422,105 +422,34 @@ New-Item -ItemType Directory -Path $manifestDir -Force | Out-Null
|
||||||
Copy-Item -Path (Join-Path $InstallDir "manifest.xml") -Destination $manifestDir -Force
|
Copy-Item -Path (Join-Path $InstallDir "manifest.xml") -Destination $manifestDir -Force
|
||||||
$manifestFile = Join-Path $manifestDir "manifest.xml"
|
$manifestFile = Join-Path $manifestDir "manifest.xml"
|
||||||
|
|
||||||
# Outlook Add-ins koennen NICHT per Registry/Shared Folder Catalog registriert werden.
|
# Outlook Add-ins werden pro Benutzer ueber den Browser registriert.
|
||||||
# Das funktioniert nur fuer Word/Excel/PowerPoint.
|
# Das Add-in wird am Microsoft 365 Konto des Benutzers gespeichert,
|
||||||
# Fuer Outlook gibt es zwei Wege:
|
# nicht am Computer. Auf einem Terminal Server muss jeder Benutzer
|
||||||
# 1. Exchange Online PowerShell (New-App) - fuer Organisationen mit Exchange
|
# das Add-in einmalig selbst hinzufuegen.
|
||||||
# 2. Manuell ueber Outlook Web App (OWA) - fuer alle
|
|
||||||
|
|
||||||
$registeredViaExchange = $false
|
Write-Host " Das Add-in muss pro Benutzer einmalig in Outlook" -ForegroundColor White
|
||||||
|
Write-Host " hinzugefuegt werden. Es wird am Microsoft 365 Konto" -ForegroundColor White
|
||||||
Write-Host " Outlook Add-ins muessen ueber Exchange oder manuell registriert werden." -ForegroundColor Gray
|
Write-Host " gespeichert und ist dann auf allen Geraeten verfuegbar." -ForegroundColor White
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host " So geht's:" -ForegroundColor Cyan
|
||||||
|
Write-Host " 1. Im Browser oeffnen: https://aka.ms/olksideload" -ForegroundColor White
|
||||||
|
Write-Host " 2. Mit dem eigenen Microsoft 365 Konto anmelden" -ForegroundColor White
|
||||||
|
Write-Host " 3. 'Meine Add-Ins' -> 'Benutzerdefinierte Add-Ins'" -ForegroundColor White
|
||||||
|
Write-Host " 4. 'Benutzerdefiniertes Add-In hinzufuegen' -> 'Aus Datei'" -ForegroundColor White
|
||||||
|
Write-Host " 5. Diese Datei waehlen:" -ForegroundColor White
|
||||||
|
Write-Host " $manifestFile" -ForegroundColor Yellow
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host " Alternativ direkt in Outlook:" -ForegroundColor Cyan
|
||||||
|
Write-Host " Classic: Datei -> Info -> 'Add-Ins verwalten'" -ForegroundColor White
|
||||||
|
Write-Host " Neu: Einstellungen -> Add-Ins verwalten" -ForegroundColor White
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|
||||||
# Variante 1: Exchange Online PowerShell versuchen
|
$openBrowser = Read-Host "Sideload-Seite jetzt im Browser oeffnen? (j/n)"
|
||||||
$tryExchange = Read-Host "Haben Sie Exchange Online und moechten das Add-in per Exchange bereitstellen? (j/n)"
|
if ($openBrowser -eq "j") {
|
||||||
|
|
||||||
if ($tryExchange -eq "j") {
|
|
||||||
Write-Step "Pruefe Exchange Online PowerShell Modul ..."
|
|
||||||
|
|
||||||
# Modul pruefen/installieren
|
|
||||||
$exModule = Get-Module -ListAvailable -Name "ExchangeOnlineManagement" -ErrorAction SilentlyContinue
|
|
||||||
if (-not $exModule) {
|
|
||||||
Write-Warn "ExchangeOnlineManagement Modul nicht gefunden."
|
|
||||||
$installModule = Read-Host "Modul jetzt installieren? (j/n)"
|
|
||||||
if ($installModule -eq "j") {
|
|
||||||
try {
|
|
||||||
Install-Module -Name ExchangeOnlineManagement -Force -Scope CurrentUser
|
|
||||||
Write-Step "Modul installiert."
|
|
||||||
} catch {
|
|
||||||
Write-Err "Modul-Installation fehlgeschlagen: $_"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$exModule = Get-Module -ListAvailable -Name "ExchangeOnlineManagement" -ErrorAction SilentlyContinue
|
|
||||||
if ($exModule) {
|
|
||||||
try {
|
|
||||||
Import-Module ExchangeOnlineManagement
|
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host " Es oeffnet sich ein Anmeldefenster fuer Exchange Online." -ForegroundColor Gray
|
|
||||||
Write-Host " Bitte mit einem Exchange-Administrator-Konto anmelden." -ForegroundColor Gray
|
|
||||||
Write-Host ""
|
|
||||||
|
|
||||||
Connect-ExchangeOnline -ShowBanner:$false
|
|
||||||
|
|
||||||
$manifestBytes = [System.IO.File]::ReadAllBytes($manifestFile)
|
|
||||||
|
|
||||||
# Als Organisations-App bereitstellen (fuer alle Benutzer)
|
|
||||||
$orgApp = Read-Host "Fuer alle Benutzer der Organisation bereitstellen? (j/n)"
|
|
||||||
if ($orgApp -eq "j") {
|
|
||||||
New-App -OrganizationApp -FileData $manifestBytes -DefaultStateForUser Enabled | Out-Null
|
|
||||||
Write-Step "Add-in fuer alle Benutzer der Organisation bereitgestellt!"
|
|
||||||
} else {
|
|
||||||
# Nur fuer bestimmte Mailbox
|
|
||||||
$mailbox = Read-Host "E-Mail-Adresse des Benutzers"
|
|
||||||
New-App -Mailbox $mailbox -FileData $manifestBytes | Out-Null
|
|
||||||
Write-Step "Add-in fuer $mailbox bereitgestellt!"
|
|
||||||
}
|
|
||||||
|
|
||||||
$registeredViaExchange = $true
|
|
||||||
Disconnect-ExchangeOnline -Confirm:$false -ErrorAction SilentlyContinue
|
|
||||||
|
|
||||||
} catch {
|
|
||||||
Write-Err "Exchange-Registrierung fehlgeschlagen: $_"
|
|
||||||
Write-Warn "Das Add-in kann stattdessen manuell hinzugefuegt werden (siehe unten)."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Variante 2: Manuelle Registrierung (Fallback / kein Exchange)
|
|
||||||
if (-not $registeredViaExchange) {
|
|
||||||
Write-Host ""
|
|
||||||
Write-Header "Add-in manuell in Outlook registrieren"
|
|
||||||
Write-Host " Das Add-in muss in Outlook manuell hinzugefuegt werden." -ForegroundColor White
|
|
||||||
Write-Host " Dies gilt fuer Outlook Classic UND das neue Outlook." -ForegroundColor White
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host " Variante A - Ueber Outlook Web App:" -ForegroundColor Cyan
|
|
||||||
Write-Host " 1. Im Browser oeffnen: https://aka.ms/olksideload" -ForegroundColor White
|
|
||||||
Write-Host " 2. 'Meine Add-Ins' -> 'Benutzerdefinierte Add-Ins'" -ForegroundColor White
|
|
||||||
Write-Host " 3. 'Benutzerdefiniertes Add-In hinzufuegen' -> 'Aus Datei hinzufuegen'" -ForegroundColor White
|
|
||||||
Write-Host " 4. Datei waehlen: $manifestFile" -ForegroundColor Yellow
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host " Variante B - Direkt in Outlook Classic:" -ForegroundColor Cyan
|
|
||||||
Write-Host " 1. Outlook Classic oeffnen" -ForegroundColor White
|
|
||||||
Write-Host " 2. Datei -> Info -> 'Add-Ins verwalten' (oeffnet sich im Browser)" -ForegroundColor White
|
|
||||||
Write-Host " 3. Weiter wie bei Variante A ab Schritt 2" -ForegroundColor White
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host " Variante C - Direkt im neuen Outlook:" -ForegroundColor Cyan
|
|
||||||
Write-Host " 1. Neues Outlook oeffnen" -ForegroundColor White
|
|
||||||
Write-Host " 2. Einstellungen (Zahnrad) -> Add-Ins verwalten" -ForegroundColor White
|
|
||||||
Write-Host " 3. 'Benutzerdefinierte Add-Ins' -> 'Aus Datei hinzufuegen'" -ForegroundColor White
|
|
||||||
Write-Host " 4. Datei waehlen: $manifestFile" -ForegroundColor Yellow
|
|
||||||
Write-Host ""
|
|
||||||
|
|
||||||
$openBrowser = Read-Host "Sideload-Seite jetzt im Browser oeffnen? (j/n)"
|
|
||||||
if ($openBrowser -eq "j") {
|
|
||||||
Start-Process "https://aka.ms/olksideload"
|
Start-Process "https://aka.ms/olksideload"
|
||||||
Write-Step "Browser geoeffnet. Bitte Add-in wie oben beschrieben hinzufuegen."
|
Write-Step "Browser geoeffnet."
|
||||||
|
Write-Host " Bitte Add-in wie oben beschrieben hinzufuegen." -ForegroundColor White
|
||||||
Write-Host " Manifest-Datei: $manifestFile" -ForegroundColor Yellow
|
Write-Host " Manifest-Datei: $manifestFile" -ForegroundColor Yellow
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
|
|
@ -533,10 +462,10 @@ $installInfo = @{
|
||||||
taskName = $taskName
|
taskName = $taskName
|
||||||
installedAt = (Get-Date).ToString("o")
|
installedAt = (Get-Date).ToString("o")
|
||||||
manifestDir = $manifestDir
|
manifestDir = $manifestDir
|
||||||
|
manifestFile = $manifestFile
|
||||||
manifestUrl = "https://localhost:$localPort"
|
manifestUrl = "https://localhost:$localPort"
|
||||||
caThumbprint = $caCert.Thumbprint
|
caThumbprint = $caCert.Thumbprint
|
||||||
localhostThumbprint = $localhostCert.Thumbprint
|
localhostThumbprint = $localhostCert.Thumbprint
|
||||||
registeredViaExchange = $registeredViaExchange
|
|
||||||
}
|
}
|
||||||
$installInfo | ConvertTo-Json | Set-Content (Join-Path $InstallDir "install-info.json") -Encoding UTF8
|
$installInfo | ConvertTo-Json | Set-Content (Join-Path $InstallDir "install-info.json") -Encoding UTF8
|
||||||
|
|
||||||
|
|
@ -550,15 +479,9 @@ Write-Host " Installationsverzeichnis: $InstallDir" -ForegroundColor White
|
||||||
Write-Host " Lokaler Server: https://localhost:$localPort" -ForegroundColor White
|
Write-Host " Lokaler Server: https://localhost:$localPort" -ForegroundColor White
|
||||||
Write-Host " Manifest: $manifestFile" -ForegroundColor White
|
Write-Host " Manifest: $manifestFile" -ForegroundColor White
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
Write-Host " [!] Jeder Benutzer muss das Add-in einmalig in Outlook" -ForegroundColor Yellow
|
||||||
if ($registeredViaExchange) {
|
Write-Host " hinzufuegen: https://aka.ms/olksideload" -ForegroundColor Yellow
|
||||||
Write-Host " Outlook Add-in wurde per Exchange bereitgestellt." -ForegroundColor Green
|
Write-Host " Manifest-Datei: $manifestFile" -ForegroundColor Yellow
|
||||||
Write-Host " Es kann einige Minuten dauern bis es in Outlook erscheint." -ForegroundColor Green
|
|
||||||
} else {
|
|
||||||
Write-Host " [!] Add-in muss noch manuell in Outlook hinzugefuegt werden!" -ForegroundColor Yellow
|
|
||||||
Write-Host " Manifest-Datei: $manifestFile" -ForegroundColor Yellow
|
|
||||||
Write-Host " Oder im Browser: https://aka.ms/olksideload" -ForegroundColor Yellow
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
Write-Host " Naechster Schritt: Im Add-in ein Sync-Profil mit den" -ForegroundColor White
|
Write-Host " Naechster Schritt: Im Add-in ein Sync-Profil mit den" -ForegroundColor White
|
||||||
|
|
|
||||||
|
|
@ -101,24 +101,11 @@ if (Test-Path $certInfoPath) {
|
||||||
|
|
||||||
Write-Header "Schritt 3: Outlook Add-in Registrierung"
|
Write-Header "Schritt 3: Outlook Add-in Registrierung"
|
||||||
|
|
||||||
# Pruefen ob per Exchange registriert
|
Write-Warn "Das Add-in ist pro Benutzer am Microsoft 365 Konto registriert."
|
||||||
$installInfoPath = Join-Path $InstallDir "install-info.json"
|
Write-Host " Jeder Benutzer muss es selbst in Outlook entfernen:" -ForegroundColor Gray
|
||||||
$registeredViaExchange = $false
|
Write-Host " 1. https://aka.ms/olksideload oeffnen" -ForegroundColor Gray
|
||||||
if (Test-Path $installInfoPath) {
|
Write-Host " 2. Unter 'Meine Add-Ins' das Add-in entfernen" -ForegroundColor Gray
|
||||||
$installInfo = Get-Content $installInfoPath -Raw | ConvertFrom-Json
|
Write-Host " Oder in Outlook: Add-Ins verwalten -> Add-In entfernen" -ForegroundColor Gray
|
||||||
$registeredViaExchange = $installInfo.registeredViaExchange -eq $true
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($registeredViaExchange) {
|
|
||||||
Write-Warn "Das Add-in wurde per Exchange bereitgestellt."
|
|
||||||
Write-Host " Um es dort zu entfernen:" -ForegroundColor Gray
|
|
||||||
Write-Host " 1. Exchange Online PowerShell: Get-App | Remove-App" -ForegroundColor Gray
|
|
||||||
Write-Host " 2. Oder im Microsoft 365 Admin Center" -ForegroundColor Gray
|
|
||||||
} else {
|
|
||||||
Write-Step "Das Add-in wurde manuell in Outlook hinzugefuegt."
|
|
||||||
Write-Host " Bitte manuell entfernen:" -ForegroundColor Gray
|
|
||||||
Write-Host " Outlook -> Add-Ins verwalten -> Add-In entfernen" -ForegroundColor Gray
|
|
||||||
}
|
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# Schritt 4: Firewall-Regel entfernen
|
# Schritt 4: Firewall-Regel entfernen
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue