this post was submitted on 03 May 2024
183 points (95.5% liked)
Technology
58303 readers
11 users here now
This is a most excellent place for technology news and articles.
Our Rules
- Follow the lemmy.world rules.
- Only tech related content.
- Be excellent to each another!
- Mod approved content bots can post up to 10 articles per day.
- Threads asking for personal tech support may be deleted.
- Politics threads may be removed.
- No memes allowed as posts, OK to post as comments.
- Only approved bots from the list below, to ask if your bot can be added please contact us.
- Check for duplicates before posting, duplicates may be removed
Approved Bots
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You can literally copy / paste either of these commands into an elevated Powershell session. They create the directories needed, go fetch the script from Github, then execute it with the necessary arguments. I've run this on Windows 10, Windows 11, and all Windows Server versions from 2016 through 2022.
This is a “Confirmation” version. It will stop and prompt you before actually changing anything.
[System.IO.Directory]::CreateDirectory("C:\winrebackup"); [System.IO.Directory]::CreateDirectory("C:\tcmds"); cd c:\tcmds; Invoke-WebRequest -Uri https://raw.githubusercontent.com/Bash-OverRide/UseFulScripts/master/winre.ps1 -OutFile ./winre.ps1; dir; ./winre.ps1 -BackupFolder c:\winrebackup
This is a “No Confirmation” version. If the WinRE partition needs expanded it will just do it.
[System.IO.Directory]::CreateDirectory("C:\winrebackup"); [System.IO.Directory]::CreateDirectory("C:\tcmds"); cd c:\tcmds; Invoke-WebRequest -Uri https://raw.githubusercontent.com/Bash-OverRide/UseFulScripts/master/winre.ps1 -OutFile ./winre.ps1; dir; ./winre.ps1 -SkipConfirmation $true -BackupFolder c:\winrebackup
You may see a reboot warning if you have un-applied Windows Updates. In nearly all cases you can safely ignore the warning but the decision is up to the user.
If it fails with an error about insufficient space to resize the partition and your storage isn't full then it's likely that you have immovable files at the end of the primary partition. Turn off Hibernation and System Restore, which will remove those files, then reboot and try again. Remember to turn Hiberation and / or System Restore back on when done. I've only seen that happen a couple of times which is why it's not scripted in, just wasn't worth the effort.