From 483846aaaaee5ab33aef415b74d5a30461a5f032 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 31 Dec 2022 11:24:30 +0100 Subject: [PATCH] Update Funktion angepasst. --- functions.ps1 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/functions.ps1 b/functions.ps1 index 5526643..33d06b0 100644 --- a/functions.ps1 +++ b/functions.ps1 @@ -1,22 +1,21 @@ #Updatet all the things function Update { - Write-Host "Beginne mit dem Update aller Pakete..." +Das gute Write-Host "Beginne mit dem Update aller Pakete..." + # Winget upgrades ausführen winget upgrade --all + # ooshutup10 ausführen. Manchmal werden settings nach Windos updates zurückgesetzt + ./OOSU10.exe $HOME/.winconfig/ooshutup10/ooshutup10.cfg /quiet remove-item ~\Desktop* -include *.lnk if (Get-Module -ListAvailable -Name PSWindowsUpdate) { Write-Host "Installiere Windows Updates..." Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot - Write-Host "Update aller Powershell Module..." - if ($SimulationMode) { - Write-Host -ForegroundColor yellow 'Simulation mode is ON, nothing will be installed / removed / updated' - } + Write-Host "Update aller Powershell Module..." Write-Host -ForegroundColor Cyan 'Get all PowerShell modules' function Remove-OldPowerShellModules { param ( [string]$ModuleName, [string]$GalleryVersion ) - try { $oldVersions = Get-InstalledModule -Name $ModuleName -AllVersions -ErrorAction Stop | Where-Object { $_.Version -ne $GalleryVersion }