Last active
September 10, 2025 17:28
-
-
Save SilvortheGrand/cdeebfceff5298acc8b22cc9f915e892 to your computer and use it in GitHub Desktop.
Drop the script into the folder with the zip files and run it using pwsh ./cleaninstallhd2mods.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| h2mm list | |
| [int] $amountOfModsToNuke = 0 | |
| while (-not [int]::TryParse((Read-Host "Please enter the amount of mods you wanna nuke."), [ref] $amountOfModsToNuke) -or $amountOfModsToNuke -lt 1){} | |
| for (; $amountOfModsToNuke -gt 0; $amountOfModsToNuke--) { | |
| Write-Host "Nuking mod #$amountOfModsToNuke..." | |
| h2mm uninstall -i $amountOfModsToNuke | |
| if ($?) { | |
| Write-Host "Successfully nuked $amountOfModsToNuke" -ForegroundColor Green | |
| } | |
| else { | |
| Write-Host "Could not nuke $amountOfModsToNuke." -ForegroundColor Red | |
| } | |
| } | |
| Write-Host "Installing mods in folder..." -ForegroundColor Blue | |
| Get-ChildItem *.zip | ForEach-Object { h2mm install $_ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment