I need help with the following script, which I need to run remotely. The script downloads the Windows 11 installation executable from the Microsoft website to upgrade a system from Windows 10 to Windows 11. I tested it locally on a Windows 10 workstation, but the issue is that the process doesn’t progress—it just gets stuck in Task Manager. I’m not sure what I might be missing, and I would really appreciate your assistance.
Set-ExecutionPolicy Bypass -Scope Process -Force
Define the upgrade folder
$FolderPath = “C:\WindowsUpgrade”
Create the folder if it does not exist
if (!(Test-Path -Path $FolderPath)) {
Write-Host “Creating Windows Upgrade Folder…”
New-Item -Path $FolderPath -ItemType Directory
}
The first internet result for this was for a Powershell script that someone wrote that does actually this. A quick glance at the script would suggest your issue isn’t Powershell related, but rather you are missing required switches for the installation assistant.