Seite 1 von 1

Paket entfernen-windows-appx

Veröffentlicht: 11. Dez. 2020 - 11:56 Uhr
von den Gälen
Guten Morgen,
Ich erhalte Fehler bei der Installation des Pakets remove-windows-appx auf einem kleinen Teil meines Netzwerks. Gibt es in PowerShell ein Äquivalent zu "run_notfatal"?

Beispiel :
Falls erforderlich, entfernen: Microsoft.BingSports
Falls erforderlich, entfernen: Microsoft.BingWeather
Traceback (letzter Aufruf zuerst):
Datei "C:\wapt\common.py", Zeile 3876, in install_wapt
exitstatus = setup.install()
Datei "c:\windows\temp\waptyl5ecp\setup.py", Zeile 93, in install
Datei "C:\wapt\setuphelpers_windows.py", Zeile 840, in run_powershell
raise CalledProcessErrorOutput(e.returncode,cmd,e.output)
CalledProcessErrorOutput: Befehl u'$ProgressPreference = "SilentlyContinue"\n(Get-AppXProvisionedPackage -Online | where DisplayName -EQ "Microsoft.BingWeather" | Remove-AppxProvisionedPackage -Online) | ConvertTo-Json gab den Exit-Status 1 zurück.
Ausgabe:#< CLIXML
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"> S="Error">Remove-AppxProvisionedPackage: Der Pfad sp\xe9cifi\xe9 wurde nicht gefunden._x000D__x000A_
CalledProcessErrorOutput: Command u'$ProgressPreference = "SilentlyContinue"\n(Get-AppXProvisionedPackage -Online | where DisplayName -EQ "Microsoft.BingWeather" | Remove-AppxProvisionedPackage-Online) | 'ConvertTo-Json' gab den Exit-Status 1 zurück.
Ausgabe:#< CLIXML
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04> S="Error">Remove-AppxProvisionedPackage: Der angegebene Pfad wurde nicht gefunden._x000D__x000A_

Betreff: Paket remove-windows-appx

Veröffentlicht: 11. Dez. 2020 - 13:58 Uhr
von florentR2
Ich habe es nicht ausprobiert, aber ich hätte Folgendes versucht:

Code: Alle auswählen

MyCommand > $null
Oder

Code: Alle auswählen

MyCommand > c:\quelquepart.log

Oder

Code: Alle auswählen

Mycommand | out-null

Betreff: Paket remove-windows-appx

Veröffentlicht: 11. Dez. 2020 - 16:08 Uhr
von den Gälen
Es gibt noch einige Positionen, an denen es nicht funktioniert:
Zum Beispiel:
Unerwünschte Windows Store-Anwendungen werden entfernt...
Falls erforderlich: Microsoft.3DBuilder Falls
erforderlich: Microsoft.Print3D Falls erforderlich:
Microsoft.Microsoft3DViewer Falls erforderlich:
Microsoft.MixedReality.Portal Falls erforderlich
: Microsoft.YourPhone Falls erforderlich: Microsoft.WindowsFeedbackHub Falls
erforderlich: Microsoft.Windows.Cortana Falls
erforderlich
: Microsoft.GetHelp Falls
erforderlich: Microsoft.BingFinance Falls erforderlich: Microsoft.BingNews
Falls erforderlich: Microsoft.BingSports
erforderlich
: Microsoft.BingWeather
Traceback (letzter Aufruf):
Datei "C:\wapt\common.py", Zeile 3876, in install_wapt
exitstatus = setup.install()
Datei "c:\windows\temp\wapth6yiqi\setup.py", Zeile 93, in install
Datei "C:\wapt\setuphelpers_windows.py", Zeile 840, in run_powershell
raise CalledProcessErrorOutput(e.returncode,cmd,e.output)
CalledProcessErrorOutput: Der Befehl u'$ProgressPreference = "SilentlyContinue"\n(Get-AppXProvisionedPackage -Online | where DisplayName -EQ "Microsoft.BingWeather" | Remove-AppxProvisionedPackage -Online | out-null) | ConvertTo-Json' gab den Exit-Status 1 zurück.
Ausgabe:#< CLIXML
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"> S="Error">Remove-AppxProvisionedPackage: Der Pfad sp\xe9cifi\xe9 wurde nicht gefunden._x000D__x000A_
CalledProcessErrorOutput: Command u'$ProgressPreference = "SilentlyContinue"\n(Get-AppXProvisionedPackage -Online | where DisplayName -EQ "Microsoft.BingWeather" | Remove-AppxProvisionedPackage-Online | out-null) | 'ConvertTo-Json' gab den Exit-Status 1 zurück.
Ausgabe:#< CLIXML
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"> S="Error">Remove-AppxProvisionedPackage: Der angegebene Pfad wurde nicht gefunden._x000D__x000A_
Mit diesem Code:

Code: Alle auswählen

def install():
    print("Removing undesired Windows Store applications...")
    for app in apps:
        print("If needed, removing: %s" % app)
        #print('Get-AppxPackage -Name "%s" -AllUsers | Remove-AppxPackage' % app)
        run_powershell('Get-AppxPackage -Name "%s" -AllUsers | Remove-AppxPackage | out-null' % app)
        #print('Get-AppXProvisionedPackage -Online | where DisplayName -EQ "%s" | Remove-AppxProvisionedPackage -Online' % app)
        run_powershell('Get-AppXProvisionedPackage -Online | where DisplayName -EQ "%s" | Remove-AppxProvisionedPackage -Online | out-null' % app)


def session_setup():
    print("Removing undesired Windows Store applications...")
    for app in apps:
        print("If needed, removing: %s" % app)
        #print('Get-AppxPackage -Name "%s" | Remove-AppxPackage' % app)
        run_powershell('Get-AppxPackage -Name "%s" | Remove-AppxPackage | out-null' % app)

Betreff: Paket remove-windows-appx

Veröffentlicht: 11. Dez. 2020 - 17:06 Uhr
von florentR2
Ja

Betreff: Paket remove-windows-appx

Veröffentlicht: 12. Dez. 2020 - 17:04 Uhr
von den Gälen
Tut mir leid, aber keine der Lösungen funktioniert.

Die Verwendung von run_notfatal behebt den Fehler, aber die Installation scheint zu schnell abzulaufen, um tatsächlich zu funktionieren...

Code: Alle auswählen

def install():
    print("Removing undesired Windows Store applications...")
    for app in apps:
        print("If needed, removing: %s" % app)
        run_notfatal('powershell.exe Get-AppxPackage -Name "%s" -AllUsers | Remove-AppxPackage' % app)
        run_notfatal('powershell.exe Get-AppXProvisionedPackage -Online | where DisplayName -EQ "%s" | Remove-AppxProvisionedPackage -Online' % app)