Created
May 28, 2021 03:06
-
-
Save moorer2k/4fd89875f1b5f4c93995319e39e82c83 to your computer and use it in GitHub Desktop.
Simple PowerShell script to change between your min / max threads to use for XMRIG on windows.
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
#Automatically switch between desired threads for XMRIG. | |
$path = 'C:\Users\Moore\Desktop\xmrig\config.json' | |
$minThreads = '15' | |
$maxThreads = '28' | |
if (Select-String -Path $path -Pattern "$minThreads," -SimpleMatch -Quiet) | |
{ | |
(Get-Content $path) -replace "$minThreads,", "$maxThreads," | Out-File -encoding ASCII $path | |
} | |
else | |
{ | |
(Get-Content $path) -replace "$maxThreads," , "$minThreads," | Out-File -encoding ASCII $path | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment