Hi,
first, thanks for this nice script, i want to use it for our new windows 11 pro devices.
I build a .BAT and start my personal start.ps1-Script (this contains a lot of other stuff like create a user, join domain, install software with winget,...):
REM start.bat
powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -Verb RunAs powershell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File \"%~dp0Starterscript\start.ps1"'
The script start.ps1 contain the following line:
...
#Das Script Win11Debloat stellt ein, dass die Taskbar Links angeordnet wird"
Start-Process powershell.exe "$PSScriptRoot\scripts\w11debloat\Win11Debloat.ps1 -TaskbarAlignLeft -Silent" -Wait -NoNewWindow
...
When I run the Bat-File with my local Admin Account, everthing works fine, the explorer close, restart and the taskbar is allign on the left site.
When I Run the Bat-File with a User-Account, the BAT ask me for my Admin-Account, then the script Win11Debloat.ps1 starts, the explorer killed by the sriptt, and then nothing happens. When I start the task explorer over the taskmanager, the Taskbar is still allign central.
Can you help me, how I must start the script Win11Debloat.ps1 from my sript start.ps1 correctly?
Thank you!
Marco