When executing the WinDebloatTools.ps1 script from a non-admin shell (particularly cmd.exe) the arguments are dropped in the process of obtaining admin privileges. I am not a powershell savvy guy, but I thing the issue is in the Request-AdminPrivilege() function, the call is made to start the process passing "$PSCommandPath without $Mode
The log shows
Arguments: None, running GUI
How can this issue be reproduced?
Run the script from a non-admin shell:
CMD: powershell -File .\WinDebloatTools.ps1 CLI
PS> .\WinDebloatTools.ps1 CLI
Describe the Bug
When executing the WinDebloatTools.ps1 script from a non-admin shell (particularly cmd.exe) the arguments are dropped in the process of obtaining admin privileges. I am not a powershell savvy guy, but I thing the issue is in the Request-AdminPrivilege() function, the call is made to start the process passing "$PSCommandPath without $Mode
The log shows Arguments: None, running GUI
How can this issue be reproduced?
Run the script from a non-admin shell: CMD: powershell -File .\WinDebloatTools.ps1 CLI PS> .\WinDebloatTools.ps1 CLI
Expected behavior?
Expected CLI argument to invoke CLI version...
Operating System
Windows 11
Operating System Version
Version 10.0.22621 Build 22621
Logs
WinDebloatTools-2023-11.log