Windows 10 mit div. Anpassungen in Batch/Powershell
Posted: 01. Jun 2016, 15:52
Hallo zusammen,
ich hätte da gerne mal ein kleines Problem, an dem ich voll in einer Sackgasse stecke! Ich bereite gerade Windows 10 in unserem Unternehmen vor und möchte da diverse Windows 10 Bestandteile loswerden, was manuell auch wunderbar funktioniert! Das Paket wird wunderbar ausgeführt, aber der Effekt ist jetzt mehr so gegen null!
Ich habe in die setup.inf u.a. folgendes reingeschrieben:
CallHidden powershell.exe Get-AppxPackage *camera* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *communi* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *bing* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *zune* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *people* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *phone* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *photo* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *solit* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *soundrec* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *store* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *skype* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *maps* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.Office.Sway* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.WindowsAlarms* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *3d* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *xbox* | Remove-AppxPackage
wird ausgeführt, tut aber nix....
Dann fragt man ja mal den Herrn von Google und bekommt dann irgendwann den Hinweis, das Ganze doch aus einer Batch auszuführen! Gut, diverse Schreibweisen ausprobiert...:
Das ist der Aufruf:
Call "c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy Bypass -File ""C:\Win10_Anpassungen\Win10AppxPackagesremove.ps1""' -Verb RunAs}"
und das steht im Powershellscript:
Get-AppxPackage *camera* | Remove-AppxPackage
Get-AppxPackage *communi* | Remove-AppxPackage
Get-AppxPackage *bing* | Remove-AppxPackage
Get-AppxPackage *zune* | Remove-AppxPackage
Get-AppxPackage *people* | Remove-AppxPackage
Get-AppxPackage *phone* | Remove-AppxPackage
Get-AppxPackage *photo* | Remove-AppxPackage
Get-AppxPackage *solit* | Remove-AppxPackage
Get-AppxPackage *soundrec* | Remove-AppxPackage
Get-AppxPackage *store* | Remove-AppxPackage
Get-AppxPackage *skype* | Remove-AppxPackage
Get-AppxPackage *maps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.Sway* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsAlarms* | Remove-AppxPackage
Get-AppxPackage *3d* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
Get-AppxPackage *xbox* | Remove-AppxPackage
wird ausgeführt, tut aber nix.... (manuell sehr wohl!)
Was mache ich falsch? Oder hat jemand eine bessere Idee???
Danke schon mal für Anregungen, Hilfestellungen und Lösungen
Holger
ich hätte da gerne mal ein kleines Problem, an dem ich voll in einer Sackgasse stecke! Ich bereite gerade Windows 10 in unserem Unternehmen vor und möchte da diverse Windows 10 Bestandteile loswerden, was manuell auch wunderbar funktioniert! Das Paket wird wunderbar ausgeführt, aber der Effekt ist jetzt mehr so gegen null!
Ich habe in die setup.inf u.a. folgendes reingeschrieben:
CallHidden powershell.exe Get-AppxPackage *camera* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *communi* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *bing* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *zune* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *people* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *phone* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *photo* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *solit* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *soundrec* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *store* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *skype* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *maps* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.Office.Sway* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.WindowsAlarms* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *3d* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
CallHidden powershell.exe Get-AppxPackage *xbox* | Remove-AppxPackage
wird ausgeführt, tut aber nix....
Dann fragt man ja mal den Herrn von Google und bekommt dann irgendwann den Hinweis, das Ganze doch aus einer Batch auszuführen! Gut, diverse Schreibweisen ausprobiert...:
Das ist der Aufruf:
Call "c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "& {Start-Process PowerShell.exe -ArgumentList '-ExecutionPolicy Bypass -File ""C:\Win10_Anpassungen\Win10AppxPackagesremove.ps1""' -Verb RunAs}"
und das steht im Powershellscript:
Get-AppxPackage *camera* | Remove-AppxPackage
Get-AppxPackage *communi* | Remove-AppxPackage
Get-AppxPackage *bing* | Remove-AppxPackage
Get-AppxPackage *zune* | Remove-AppxPackage
Get-AppxPackage *people* | Remove-AppxPackage
Get-AppxPackage *phone* | Remove-AppxPackage
Get-AppxPackage *photo* | Remove-AppxPackage
Get-AppxPackage *solit* | Remove-AppxPackage
Get-AppxPackage *soundrec* | Remove-AppxPackage
Get-AppxPackage *store* | Remove-AppxPackage
Get-AppxPackage *skype* | Remove-AppxPackage
Get-AppxPackage *maps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.Sway* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsAlarms* | Remove-AppxPackage
Get-AppxPackage *3d* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
Get-AppxPackage *xbox* | Remove-AppxPackage
wird ausgeführt, tut aber nix.... (manuell sehr wohl!)
Was mache ich falsch? Oder hat jemand eine bessere Idee???
Danke schon mal für Anregungen, Hilfestellungen und Lösungen
Holger