https://github.com/anduin2017/reimage-windows
These scripts to configure a ready-to-use Windows environment.
https://github.com/anduin2017/reimage-windows
Last synced: about 1 year ago
JSON representation
These scripts to configure a ready-to-use Windows environment.
- Host: GitHub
- URL: https://github.com/anduin2017/reimage-windows
- Owner: Anduin2017
- Created: 2021-06-26T14:14:06.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-13T07:02:24.000Z (over 1 year ago)
- Last Synced: 2025-04-04T18:40:52.322Z (about 1 year ago)
- Language: PowerShell
- Homepage: https://win.aiurs.co
- Size: 1.98 MB
- Stars: 24
- Watchers: 4
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Re-image the Windows
[](https://gitlab.aiursoft.cn/anduin/reimage-windows/-/commits/master?ref_type=heads)
These scripts configure a ready-to-use Windows environment.
## Re-install Windows
The following command will re-install Windows 10\11\insider for you.
Right-click the start button, and click `Windows PowerShell`(Admin)`.
```powershell
iex ((New-Object System.Net.WebClient).DownloadString('https://gitlab.aiursoft.cn/anduin/reimage-windows/-/raw/master/Reimage.ps1'))
```
* It will ask you for the downloaded Windows ISO file. You can download it with any tool you like, and provide it the file name.
* It will ask you for a clean disk drive. For example Disk `E:\``. Provide it with any disk you like. (Except current OS drive)
## Warning
This next part may NOT be designed for YOU! It is for my usage to config the newly installed Windows as a ready-to-use state.
You need to **fork** this repository and modify some configuration paths in the source code.
For example:
* I copied my SSH private key file from my OneDrive. Which requires you to modify that logic.
* I copied my Windows Terminal configuration file from my OneDrive. Which requires you to modify that logic.
### One-key post config
Right-click the start button, and click `Windows PowerShell`(Admin)`.
```powershell
Remove-Item "$env:TEMP\reimage-windows-master\" -Recurse -ErrorAction SilentlyContinue; $destinationPath = "$env:TEMP\reimage-windows-master.zip"; Invoke-WebRequest -Uri "https://gitlab.aiursoft.cn/anduin/reimage-windows/-/archive/master/reimage-windows-master.zip" -OutFile $destinationPath -UseBasicParsing; Expand-Archive -Path $destinationPath -DestinationPath $env:TEMP; Remove-Item $destinationPath; Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force; . "$env:TEMP\reimage-windows-master\install.ps1"
```
Caution: **DO NOT RUN** this in Windows Terminal!!! Instead, start a pure PowerShell with admin!
### One-key test current environment
Open PowerShell and run:
```powershell
$(Invoke-WebRequest https://gitlab.aiursoft.cn/anduin/reimage-windows/-/raw/master/test_env.sh).Content | bash
```
### Ubuntu?
Some of my machines are running Ubuntu. I also have a script to initialize Ubuntu environment.
```bash
bash -c "$(wget -O- https://gitlab.aiursoft.cn/anduin/reimage-windows/-/raw/master/install.sh)"
```