Updatet nun auch VSC Addons
This commit is contained in:
@@ -3,22 +3,39 @@ function allupdates {
|
||||
Write-Host "Beginne mit dem Update aller Pakete..." -ForegroundColor Blue
|
||||
winget upgrade --all
|
||||
Remove-Item C:\Users\Public\Desktop\*.lnk
|
||||
Write-Host "Ziehe aktuelle winconfig von git..." -ForegroundColor Blue
|
||||
Set-Location $HOME/.winconfig ; git pull
|
||||
Write-Host "Aktuallisiere AutoHokey Scripts ..." -ForegroundColor Blue
|
||||
$sourceDir = "$HOME\.winconfig\configs\autohotkey"
|
||||
$targetDir = "$HOME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
|
||||
Get-ChildItem -Path $targetDir -Filter *.ahk -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue
|
||||
Get-ChildItem -Path $sourceDir | ForEach-Object {
|
||||
$linkPath = Join-Path $targetDir $_.Name
|
||||
New-Item -ItemType SymbolicLink -Path $linkPath -Target $_.FullName -ErrorAction SilentlyContinue | Out-Null
|
||||
}
|
||||
Write-Host "Beginne mit dem Update von VSC Extensions..." -ForegroundColor Blue
|
||||
$GetExtension = code --list-extensions
|
||||
foreach ($extension in $GetExtension ) {
|
||||
Write-Host "Suche Update nach Extension $extension ..." -ForegroundColor Blue
|
||||
try {
|
||||
if (code --install-extension $extension --force | Select-String -Pattern "is already installed.") {
|
||||
Write-Host "Extension $extension bereits aktuell." -ForegroundColor Blue
|
||||
}
|
||||
else {
|
||||
Write-Host "Extension $extension erfolgreich aktualisiert." -ForegroundColor Green
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Probleme beim Update der Extension $extension" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
if (Get-Module -ListAvailable -Name PSWindowsUpdate) {
|
||||
Write-Host "Installiere Windows Updates..." -ForegroundColor Blue
|
||||
Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot
|
||||
# ooshutup10 ausführen. Manchmal werden settings nach Windos updates zurückgesetzt
|
||||
Write-Host "Spiele aktuelle OOSHUTUP10 config ein... " -ForegroundColor Blue
|
||||
Set-Location $HOME/.winconfig ; ./OOSU10.exe configs/ooshutup10/ooshutup10.cfg /quiet
|
||||
Write-Host "Ziehe aktuelle winconfig von git..." -ForegroundColor Blue
|
||||
Set-Location $HOME/.winconfig ; git pull
|
||||
Write-Host "Aktuallisiere AutoHokey Scripts ..." -ForegroundColor Blue
|
||||
$sourceDir = "$HOME\.winconfig\configs\autohotkey"
|
||||
$targetDir = "$HOME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
|
||||
Get-ChildItem -Path $targetDir -Filter *.ahk -Recurse | Remove-Item -Force -ErrorAction SilentlyContinue
|
||||
Get-ChildItem -Path $sourceDir | ForEach-Object {
|
||||
$linkPath = Join-Path $targetDir $_.Name
|
||||
New-Item -ItemType SymbolicLink -Path $linkPath -Target $_.FullName -ErrorAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
Write-Host "Update aller Powershell Module..." -ForegroundColor Blue
|
||||
Write-Host -ForegroundColor Blue 'Get all PowerShell modules'
|
||||
function Remove-OldPowerShellModules {
|
||||
|
||||
Reference in New Issue
Block a user