I'm trying to upgrade our PCs from Windows 10 Enterprise LTSC to Windows 11 Enterprise LTSC automatically and silently via Group Policy. I set up a scheduled task using the SYSTEM account to run a script that executes Windows Setup. My tests on a VM and a sysadmin's PC worked fine, but when I deployed the GPO to another department, I encountered an error. The task copied the ISO to the machine, mounted it, and started the setup, but then failed with the message: 'This command cannot be run due to the error: Access is denied.' How should I approach troubleshooting this issue? Any advice would be greatly appreciated.
3 Answers
Make sure to check if those machines have any endpoint protection or HVCI enabled, as they can block the setup. I've seen issues from strict Windows Defender Application Control policies or Credential Guard preventing the SYSTEM account from executing the installer.
Have you checked the setup error log? It might give you more insight into what went wrong. Also, ensure that your setup command is running properly. It's possible that the ISO is mounting in a user session instead of the SYSTEM account. Sometimes antivirus, like Windows Defender or others, can also interfere with the installation process.
Definitely look into the setuperr.log for details on the failure. That file often has the specifics of what caused the installation to be blocked.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures