WSUS Server Installieren und Konfigurieren

Posted on: 24. Mai 2018
In diesem Video installieren wir die WSUS (Windows Server Update Service) Rolle, legen das lokale Update Verzeichnis fest und erstellen die ersten wichtigen Computergruppen.

Danach legen wir die benötigten Klassifizierungen und Produktekategorien fest, stellen das Synchronisations-Intervall ein und führen die erste Synchronisation durch. Also alles was zu Beginn wichtig ist für den sicheren Betrieb eines WSUS Servers und das Ganze ausschliesslich in PowerSHELL.
Hier der Code aus dem Youtube-Video. Die Vorgehensweise und Bemerkungen findest du direkt als Kommentare (#Grün) im Code. So wird er dir ebenfalls in der PowerSHELL ISE angezeigt werden.
——————————————–
 # WSUS Server
$WSUSDaten = "D:\WSUSData"            
$WSUSSprachen = "en","de"            
# Alle Sprachen anzeigen mit diesem Befehl, nach der WSUS Rollen-Installation: (Get-WsusServer).GetConfiguration().SupportedUpdateLanguages 
            
# Prüfen ob die Voraussetzungen erfüllt sind            
if ((Install-WindowsFeature UpdateServices -IncludeManagementTools  -WhatIf).success -eq $true)            
    {            
        Write-Host "Voraussetzungen für WSUS sind erfüllt, die Rolle wird nun installiert"            
        Install-WindowsFeature UpdateServices -IncludeManagementTools             
    }            
    else            
    {            
        return "Voraussetzungen für WSUS sind nicht erfüllt, die Installation wird abgebrochen"            
    }            
            
# Prüfen ob das Datenverzechnis vorhanden ist und sonst das Verzeichnis Erstellen            
if ((Test-Path  $WSUSDaten) -eq $true)             
    {            
        Write-Host "WSUS Daten Verzeichnis bereits vorhanden"            
    }             
    else            
    {            
        Write-Host "WSUS Daten Verzeichnis nicht vorhanden, wird nun erstellt"            
        New-Item $WSUSDaten -ItemType Directory -Force | Out-Null            
    }            
            
# Festlegen des Datenverzeichnises auf dem WSUS Server            
start "C:\Program Files\Update Services\Tools\wsusutil.exe" -ArgumentList ("postinstall CONTENT_DIR="+$WSUSDaten)            
            
# WSUS Server Objekt auslesen            
$WSUSObjekt = Get-WsusServer            
            
# Standard Computergruppen festlegen            
$WSUSObjekt.CreateComputerTargetGroup("Pilot Workstations") 
$WSUSObjekt.CreateComputerTargetGroup("Workstations")            
$WSUSObjekt.CreateComputerTargetGroup("Pilot Server")
$WSUSObjekt.CreateComputerTargetGroup("Server")            
            
# Updates direkt von Microsoft herunterladen            
Set-WsusServerSynchronization -SyncFromMU            
            
# WSUS Server Konfiguration laden            
$WSUSKonfig = $WSUSObjekt.GetConfiguration()            
            
# Sprachen auf Deutsch und English festlegen und Konfiguration speichern            
$WSUSKonfig.AllUpdateLanguagesEnabled = $false            
$WSUSKonfig.SetEnabledUpdateLanguages($WSUSSprachen)            
$WSUSKonfig.AutoApproveWsusInfrastructureUpdates = $true            
$WSUSKonfig.CollectClientInventory = $true            
$WSUSKonfig.DoServerSyncCompression = $true            
$WSUSKonfig.DownloadUpdateBinariesAsNeeded = $true            
$WSUSKonfig.LocalContentCachePath = ($WSUSDaten + "\Cache")            
$WSUSKonfig.Save()            
            
# WSUS Synchronisation festlegen und initiale Synchronisation der letzten Kategorien            
$WSUSSync = $WSUSObjekt.GetSubscription()            
$WSUSSync.SynchronizeAutomatically = $true            
$WSUSSync.SynchronizeAutomaticallyTimeOfDay = (New-TimeSpan -Hours 0)            
$wsussync.NumberOfSynchronizationsPerDay = 1            
$WSUSSync.StartSynchronizationForCategoryOnly()            
            
# Prüfen ob die initiale Synchronisation abgeschlossen ist            
while ($WSUSSync.GetSynchronizationStatus() -ne "NotProcessing"){            
Write-Host (Get-Date) -ForegroundColor Cyan            
Write-Host "Bitte warten auf Synchronisation..." -ForegroundColor Cyan            
Start-Sleep -Seconds 15            
cls            
}            
Write-Host "Initiale Synchronisation abgeschlossen..." -ForegroundColor Green            
            
# Update Produkte festlegen            
Get-WsusProduct | Where {$_.Product.Title -in (            
'Active Directory',            
'CAPICOM',            
'Microsoft Security Essentials',            
'MS Security Essentials',            
'Security Essentials',            
'Windows 10 and later drivers',            
'Windows 10 Dynamic Update',            
'Windows 10',            
'Windows Defender',            
'Windows Server 2016 and Later Servicing Drivers',            
'Windows Server 2016',            
'Windows Server Drivers'            
)} | Set-WsusProduct            
            
# Update Klassifizierungen festlegen            
Get-WsusClassification | where {$_.Classification.Title -in (            
'Service Packs',            
'Sicherheitsupdates',            
'Treiber',            
'Treibersätze',            
'Update-Rollups',            
'Updates',            
'Wichtige Updates'            
)} | Set-WsusClassification            
            
# Synchronisation der Klassifizierungen und Produktkategorien starten            
$WSUSSync.StartSynchronization()            
            
# Prüfen ob die initiale Synchronisation abgeschlossen ist            
while ($WSUSSync.GetSynchronizationStatus() -ne "NotProcessing"){            
Write-Host (Get-Date) -ForegroundColor Cyan            
Write-Host "Bitte warten auf Synchronisation..." -ForegroundColor Cyan            
Start-Sleep -Seconds 15            
cls            
}            
Write-Host "Synchronisation abgeschlossen..." -ForegroundColor Green
——————————————–
Alle WSUS Klassifizierungen in deutsch: (grün sind die wichtigsten)
Anwendungen
Definitionsupdates
Feature Packs
Service Packs
Sicherheitsupdates
Tools
Treiber
Treibersätze
Update-Rollups
Updates
Upgrades
Wichtige Updates
Alle WSUS Produktekategorien: (grün sind die wichtigsten)
Active Directory
Antigen for Exchange/SMTP
Antigen
ASP.NET Web and Data Frameworks
Azure File Sync agent updates for Windows Server 2016
Azure File Sync
Bing Bar
Bing
BizTalk Server 2002
BizTalk Server 2006R2
BizTalk Server 2009
BizTalk Server 2013
BizTalk Server
CAPICOM
Category for System Center Online Client
Compute Cluster Pack
Data Protection Manager 2006
Developer Tools, Runtimes, and Redistributables
Device Health
Device Health
Dynamisches Installationsprogramm f³r Windows Internet Explorer 7
Dynamisches Installationsprogramm f³r Windows Internet Explorer 8
Exchange 2000 Server
Exchange Server 2003
Exchange Server 2007 and Above Anti-spam
Exchange Server 2007
Exchange Server 2010
Exchange Server 2013
Exchange Server 2016
Exchange
Expression Design 3
Expression Design 4
Expression Media 2
Expression Media V1
Expression Web 3
Expression Web 4
Expression
Firewall Client for ISA Server
Fotogalerie-Installation und -Upgrades
HealthVault Connection Center Upgrades
HealthVault Connection Center
Host Integration Server 2000
Host Integration Server 2004
Host Integration Server 2006
Host Integration Server 2009
Host Integration Server 2010
HPC Pack 2008
HPC Pack
Installation von OneCare Family Safety
Internet Security and Acceleration Server 2004
Internet Security and Acceleration Server 2006
Internet Security and Acceleration Server
Lokal ver÷ffentlichte Pakete
Lokaler Herausgeber
Microsoft Advanced Threat Analytics
Microsoft Advanced Threat Analytics
Microsoft Application Virtualization 4.5
Microsoft Application Virtualization 4.6
Microsoft Application Virtualization 5.0
Microsoft Application Virtualization
Microsoft Azure Information Protection Client
Microsoft Azure Information Protection
Microsoft Azure Site Recovery Provider
Microsoft Azure
Microsoft BitLocker Administration and Monitoring v1
Microsoft BitLocker Administration and Monitoring
Microsoft Dynamics CRM 2011 SHS
Microsoft Dynamics CRM 2011
Microsoft Dynamics CRM 2013
Microsoft Dynamics CRM 2015
Microsoft Dynamics CRM 2016 SHS
Microsoft Dynamics CRM 2016
Microsoft Dynamics CRM
Microsoft HealthVault
Microsoft Lync 2010
Microsoft Lync Server 2010
Microsoft Lync Server 2013
Microsoft Lync Server and Microsoft Lync
Microsoft Monitoring Agent (MMA)
Microsoft Online Services
Microsoft Online Services-Anmelde-Assistent
Microsoft Research AutoCollage 2008
Microsoft Research AutoCollage
Microsoft Security Essentials
Microsoft SQL Server 2012
Microsoft SQL Server 2014
Microsoft SQL Server 2016
Microsoft SQL Server 2017
Microsoft SQL Server Management Studio v17
Microsoft StreamInsight V1.0
Microsoft StreamInsight
Microsoft System Center Data Protection Manager
Microsoft System Center DPM 2010
Microsoft System Center Virtual Machine Manager 2007
Microsoft System Center Virtual Machine Manager 2008
Microsoft Works 8
Microsoft Works 9
Microsoft
MS Security Essentials
Network Monitor 3
Network Monitor
New Dictionaries for Microsoft IMEs
Office 2002/XP
Office 2003
Office 2007
Office 2010
Office 2013
Office 2016
Office 365 Client
Office Communications Server 2007 R2
Office Communications Server 2007
Office Communications Server And Office Communicator
Office Communicator 2007 R2
Office Live
Office Live-Add-In
Office
OOBE ZDP
Report Viewer 2005
Report Viewer 2008
SDK Components
Search Enhancement Pack
Security Essentials
Service Bus for Windows Server 1.1
Skype for Business Server 2015, SmartSetup
Skype for Business Server 2015
Skype for Business
Skype for Windows
Skype
SQL Server 2000
SQL Server 2005
SQL Server 2008 R2
SQL Server 2008
SQL Server 2012 Product Updates for Setup
SQL Server 2014-2016 Product Updates for Setup
SQL Server Feature Pack
SQL Server
System Center 2012 – App Controller
System Center 2012 – Data Protection Manager
System Center 2012 – Operations Manager
System Center 2012 – Orchestrator
System Center 2012 – Virtual Machine Manager
System Center 2012 R2 – Data Protection Manager
System Center 2012 R2 – Operations Manager
System Center 2012 R2 – Orchestrator
System Center 2012 R2 – Virtual Machine Manager
System Center 2012 SP1 – App Controller
System Center 2012 SP1 – Data Protection Manager
System Center 2012 SP1 – Operation Manager
System Center 2012 SP1 – Virtual Machine Manager
System Center 2016 – Data Protection Manager
System Center 2016 – Operations Manager
System Center 2016 – Orchestrator
System Center 2016 – Virtual Machine Manager
System Center Advisor
System Center Configuration Manager 2007
System Center Online
System Center Virtual Machine Manager
System Center
Systems Management Server 2003
Systems Management Server
Virtual PC
Virtual Server
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010 Tools for Office Runtime
Visual Studio 2010 Tools for Office Runtime
Visual Studio 2010
Visual Studio 2012
Visual Studio 2013
Windows 10 and later drivers
Windows 10 and later upgrade & servicing drivers
Windows 10 Anniversary Update and Later Servicing Drivers
Windows 10 Anniversary Update and Later Upgrade & Servicing Drivers
Windows 10 Creators Update and Later Servicing Drivers
Windows 10 Creators Update and Later Upgrade & Servicing Drivers
Windows 10 Dynamic Update
Windows 10 Fall Creators Update and Later Servicing Drivers
Windows 10 Fall Creators Update and Later Upgrade & Servicing Drivers
Windows 10 Feature On Demand
Windows 10 GDR-DU FOD
Windows 10 GDR-DU LP
Windows 10 GDR-DU
Windows 10 Language Interface Packs
Windows 10 LTSB
Windows 10 S and Later Servicing Drivers
Windows 10 S Version 1709 and Later Servicing Drivers for testing
Windows 10 S Version 1709 and Later Upgrade & Servicing Drivers for testing
Windows 10 S Version 1803 and Later Servicing Drivers
Windows 10 S Version 1803 and Later Upgrade & Servicing Drivers
Windows 10 version 1803 and Later Servicing Drivers
Windows 10 Version 1803 and Later Upgrade & Servicing Drivers
Windows 10
Windows 2000
Windows 7
Windows 8 Dynamic Update
Windows 8 Embedded
Windows 8 Language Interface Packs
Windows 8 Language Packs
Windows 8.1 and later drivers
Windows 8.1 Dynamic Update
Windows 8.1 Language Interface Packs
Windows 8.1 Language Packs
Windows 8.1
Windows 8
Windows Admin Center
Windows Admin Center
Windows Azure Pack – Web Sites
Windows Azure Pack: Admin API
Windows Azure Pack: Admin Authentication Site
Windows Azure Pack: Admin Site
Windows Azure Pack: Configuration Site
Windows Azure Pack: Microsoft Best Practice Analyzer
Windows Azure Pack: Monitoring Extension
Windows Azure Pack: MySQL Extension
Windows Azure Pack: PowerShell API
Windows Azure Pack: SQL Server Extension
Windows Azure Pack: Tenant API
Windows Azure Pack: Tenant Authentication Site
Windows Azure Pack: Tenant Public API
Windows Azure Pack: Tenant Site
Windows Azure Pack: Usage Extension
Windows Azure Pack: Web App Gallery Extension
Windows Azure Pack: Web Sites
Windows Azure Pack
Windows Defender
Windows Dictionary Updates
Windows Embedded
Windows Essential Business Server 2008 Setup Updates
Windows Essential Business Server 2008
Windows Essential Business Server Preinstallation Tools
Windows Essential Business Server
Windows GDR-Dynamic Update
Windows Live Toolbar
Windows Live
Windows Live
Windows Live
Windows Media Dynamic Installer
Windows Next Graphics Driver Dynamic update
Windows RT 8.1
Windows RT
Windows Safe OS Dynamic Update
Windows Server 2003, Datacenter Edition
Windows Server 2003
Windows Server 2008 Server-Manager û Dynamic Installer
Windows Server 2008
Windows Server 2012 Language Packs
Windows Server 2012 R2 Drivers
Windows Server 2012 R2 Language Packs
Windows Server 2012 R2
Windows Server 2012
Windows Server 2016 and Later Servicing Drivers
Windows Server 2016
Windows Server Drivers
Windows Server Solutions Best Practices Analyzer 1.0
Windows Server Technical Preview Language Packs
Windows Server-Manager – Windows Server Updates Services (WSUS) Dynamic Installer
Windows Small Business Server 2003
Windows Small Business Server 2008 Migration Preparation Tool
Windows Small Business Server 2008
Windows Small Business Server 2011 Standard
Windows Small Business Server
Windows Ultimate Extras
Windows Vista Dynamic Installer
Windows Vista Ultimate Language Packs
Windows Vista
Windows XP 64-Bit Edition Version 2003
Windows XP Embedded
Windows XP x64 Edition
Windows XP
Windows
Works 6-9 Converter
Works
Writer-Installation und -Upgrades
Solltest du irgendwelche Fragen haben, dann kannst du diese gerne entweder hier im Blog oder direkt unter dem YouTube Video stellen. Ich gebe alles, deine Fragen zeitnahe zu beantworten oder ein entsprechendes Video darüber zu machen.
Gerade die Grundlagen-Videos werde ich nicht mit viel Text ausschmücken. Bei mir ist jeweils jede Code-Zeile direkt im Code Kommentiert (#Grün). Du kannst den Code direkt mit in dein Script kopieren und hast so eine gute Orientierungshilfe, sobald du die Scripts auf deine Bedürfnisse anpasst.

Ich erstelle und veröffentliche sämtliche Videos kostenlos und blende auch keine Werbung ein, dies will ich auch so beibehalten. Da das vermittelte Wissen aber in teuren Kursen erlangt werden kann, ist eine kleine Spende hin und wieder sicher keine schlechte Gegenleistung.