# Script Name: pswindowsupdate-installer.ps1 # Beschreibung: Installiert das Modul 'PSWindowsUpdate' und alle anderen Voraussetzungen # Lauffähig unter Windows Server 2016, 2019 und 2022 # Aufruf: - # Autor: Patrick Asmus # Web: https://www.media-techport.de # Git-Reposit.: https://git.media-techport.de/scriptos/PSWindowsUpdate.git # Version: 1.0 # Datum: 29.11.2023 # Modifikation: Initial ##################################################### # Setze TLS 1.2 als Sicherheitsprotokoll [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 # Überprüfe, ob das PowerShellGet-Modul vorhanden ist. Falls nicht, installiere es. if (-not (Get-Module -Name PowerShellGet -ListAvailable)) { Install-Module -Name PowerShellGet -Force -AllowClobber } # Installiere PSWindowsUpdate-Modul Install-Module -Name PSWindowsUpdate -Force # Zeige installiertes PSWindowsUpdate-Modul an Get-Package -Name PSWindowsUpdate