Outlook (neu) global entfernen (SYSTEM-Kontext!)
Powershell:
Code: Alles auswählen
# Outlook (neu) für alle User entfernen
Get-AppxPackage -AllUsers *OutlookForWindows* | Remove-AppxPackage -AllUsers
# Provisionierung entfernen (entscheidend für neue User!)
Get-AppxProvisionedPackage -Online |
Where-Object { $_.DisplayName -like "*OutlookForWindows*" } |
Remove-AppxProvisionedPackage -Online
„Neues Outlook“ per Policy deaktivieren
Registry (skriptfähig)
Code: Alles auswählen
$regPath = "HKLM:\Software\Policies\Microsoft\Office\16.0\Outlook\Options\General"
New-Item -Path $regPath -Force | Out-Null
New-ItemProperty `
-Path $regPath `
-Name "HideNewOutlookToggle" `
-PropertyType DWord `
-Value 1 `
-Force
Vorteil von HKLM:
gilt für alle User
auch für neu angelegte Profile
OneDrive unter Windows 11 hart deaktivieren
Code: Alles auswählen
New-Item -Path "HKLM:\Software\Policies\Microsoft\Windows\OneDrive" -Force
New-ItemProperty `
-Path "HKLM:\Software\Policies\Microsoft\Windows\OneDrive" `
-Name "DisableFileSyncNGSC" `
-PropertyType DWord `
-Value 1 `
-Force
Microsoft Store blockieren
Wenn ihr keine Store-Apps braucht:
Code: Alles auswählen
New-Item -Path "HKLM:\Software\Policies\Microsoft\WindowsStore" -Force
New-ItemProperty `
-Path "HKLM:\Software\Policies\Microsoft\WindowsStore" `
-Name "RemoveWindowsStore" `
-PropertyType DWord `
-Value 1 `
-Force
Alles zusammen in einem PowerShell-Skript für Windows 11
✔ Entfernt Outlook (neu) (inkl. Provisionierung)
✔ Blendet „Neues Outlook“ global aus
✔ Verhindert Taskleisten-Pinning
✔ Deaktiviert OneDrive
✔ Optional: blockiert den Microsoft Store
✔ Logging nach C:\ProgramData\DisableModernOutlook.log
Code: Alles auswählen
# ==========================================================
# Disable Modern Outlook & OneDrive - Windows 11
# Run as SYSTEM
# ==========================================================
$LogFile = "C:\ProgramData\DisableModernOutlook.log"
function Write-Log {
param ([string]$Message)
$Time = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
Add-Content -Path $LogFile -Value "$Time | $Message"
}
Write-Log "==== Script start ===="
# ----------------------------------------------------------
# 1. Remove Outlook (new) AppX (installed + provisioned)
# ----------------------------------------------------------
try {
Write-Log "Removing Outlook (new) AppX packages..."
Get-AppxPackage -AllUsers *OutlookForWindows* | ForEach-Object {
Write-Log "Removing AppX for user: $($_.PackageFullName)"
Remove-AppxPackage -Package $_.PackageFullName -AllUsers -ErrorAction SilentlyContinue
}
Get-AppxProvisionedPackage -Online |
Where-Object { $_.DisplayName -like "*OutlookForWindows*" } |
ForEach-Object {
Write-Log "Removing provisioned package: $($_.DisplayName)"
Remove-AppxProvisionedPackage -Online -PackageName $_.PackageName -ErrorAction SilentlyContinue
}
} catch {
Write-Log "ERROR removing Outlook (new): $_"
}
# ----------------------------------------------------------
# 2. Hide "New Outlook" toggle (global)
# ----------------------------------------------------------
try {
Write-Log "Disabling New Outlook toggle..."
$OutlookPolicyPath = "HKLM:\Software\Policies\Microsoft\Office\16.0\Outlook\Options\General"
New-Item -Path $OutlookPolicyPath -Force | Out-Null
New-ItemProperty `
-Path $OutlookPolicyPath `
-Name "HideNewOutlookToggle" `
-PropertyType DWord `
-Value 1 `
-Force | Out-Null
} catch {
Write-Log "ERROR setting Outlook policy: $_"
}
# ----------------------------------------------------------
# 3. Taskbar layout (prevent pinning)
# ----------------------------------------------------------
try {
Write-Log "Applying taskbar layout..."
$LayoutFile = "C:\Windows\LayoutModification.xml"
@"
<?xml version="1.0" encoding="utf-8"?>
<LayoutModificationTemplate
xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
Version="1">
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
<defaultlayout:TaskbarLayout
xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout">
<defaultlayout:TaskbarPinList>
</defaultlayout:TaskbarPinList>
</defaultlayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>
"@ | Set-Content -Path $LayoutFile -Encoding UTF8
$ExplorerPolicyPath = "HKLM:\Software\Policies\Microsoft\Windows\Explorer"
New-Item -Path $ExplorerPolicyPath -Force | Out-Null
New-ItemProperty `
-Path $ExplorerPolicyPath `
-Name "StartLayoutFile" `
-PropertyType String `
-Value $LayoutFile `
-Force | Out-Null
} catch {
Write-Log "ERROR applying taskbar layout: $_"
}
# ----------------------------------------------------------
# 4. Disable OneDrive
# ----------------------------------------------------------
try {
Write-Log "Disabling OneDrive..."
$OneDrivePolicyPath = "HKLM:\Software\Policies\Microsoft\Windows\OneDrive"
New-Item -Path $OneDrivePolicyPath -Force | Out-Null
New-ItemProperty `
-Path $OneDrivePolicyPath `
-Name "DisableFileSyncNGSC" `
-PropertyType DWord `
-Value 1 `
-Force | Out-Null
Stop-Process -Name OneDrive -Force -ErrorAction SilentlyContinue
} catch {
Write-Log "ERROR disabling OneDrive: $_"
}
# ----------------------------------------------------------
# 5. Optional: Disable Microsoft Store
# ----------------------------------------------------------
try {
Write-Log "Disabling Microsoft Store..."
$StorePolicyPath = "HKLM:\Software\Policies\Microsoft\WindowsStore"
New-Item -Path $StorePolicyPath -Force | Out-Null
New-ItemProperty `
-Path $StorePolicyPath `
-Name "RemoveWindowsStore" `
-PropertyType DWord `
-Value 1 `
-Force | Out-Null
} catch {
Write-Log "ERROR disabling Store: $_"
}
Write-Log "==== Script completed ===="
exit 0
Vorab testen und Sicherung nicht vergessen