Update Funktion angepasst.
This commit is contained in:
@@ -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 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user