memstechtips / UnattendedWinstall

Personalized Unattended Answer Files that helps automatically debloat and customize Windows 10 & 11 during the installation process.
MIT License
3.54k stars 400 forks source link

Unable to run "UWScript.ps1" as Write-Host is not recognised #183

Open DaniBoi97 opened 19 hours ago

DaniBoi97 commented 19 hours ago

Hello!

First of all, I'd like to thank you for the hard work that was put into this project! I found it very useful for debloating Windows 11 on my new rig, and I couldn't be happier!

Unfortunately I ran into an issue recently with "UWScript.ps1". Running it opened up PowerShell in admin mode, which then spewed out error messages on a loop. Here's an example of the error message: Write-Host : The term 'Write-Host' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Windows\Setup\Scripts\UWScript.ps1:85 char:5

I attached a text file with the full list of messages - or at least as much as I was able to capture with PowerShell constantly spewing them at an enormous speeds. UWScript - errors.txt

When I first installed Windows 11 with your answer file, I was able to run "UWScript.ps1" successfully. Now I can't anymore... I should mention that I'm not very savvy when it comes to scripting or using PowerShell at all, so you'll have to forgive me for that cause I don't know the first thing about how to troubleshoot this.

Can you please assist me? Do let me know please if there's any additional information I can provide from my side.

Thank you in advance!