in the above script .
1.conf to 7.conf are needed in the same folder.
this is the script to create the conf files if you have a sgminer.conf for multi-algo already in the sgminer folder
$ccc = new-object system.net.webclient
$ddd = $ccc.downloadstring("c:\users\admin\documents\sgminer.conf")
[System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") >null
$sgminer = New-Object System.Web.Script.Serialization.JavaScriptSerializer
$poolglobal = $sgminer.DeserializeObject($ddd)
$pools = $poolglobal.pools
#Global Settings Start
$failoveronly = $poolglobal."failover-only"
$devices = $poolglobal.devices
$lookupgap = $poolglobal."lookup-gap"
$intensity = $poolglobal.intensity
$worksize = $poolglobal.worksize
$tempcutoff = $poolglobal."temp-cutoff"
$tempoverheat = $poolglobal."temp-overheat"
$gpufan = $poolglobal."gpu-fan"
$temptarget = $poolglobal."temp-target"
$gpumemdiff = $poolglobal."gpu-memdiff"
$shares = $poolglobal.shares
$kernelpath = $poolglobal."kernel-path"
$autofan = $poolglobal."auto-fan"
$expiry = $poolglobal.expiry
$failoverswitchdelay = $poolglobal."failover-switch-delay"
$gpudyninterval = $poolglobal."gpu-dyninterval"
$gpuplatform = $poolglobal."gpu-platform"
$hamsiexpandbig = $poolglobal."hamsi-expand-big"
$log = $poolglobal.log
$nopooldisable = $poolglobal."no-pool-disable"
$noclientreconnect = $poolglobal."no-client-reconnect"
$queue = $poolglobal.queue
$scantime = $poolglobal."scan-time"
$tcpkeepalive = $poolglobal."tcp-keepalive"
$temphysteresis = $poolglobal."temp-hysteresis"
#Global Settings End
foreach ($pool in $pools) {
#Pool Spec starts
$name = $pool.name |out-string
#$name = $name -replace [Environment]::NewLine
$url = $pool.url |out-string
#$url = $url -replace [Environment]::NewLine
$user = $pool.user |out-string
#$user = $user -replace [Environment]::NewLine
$pass = $pool.pass |out-string
#$pass = $pass -replace [Environment]::NewLine
$nfactor = $pool.nfactor |out-string
#$nfactor = $nfactor -replace [Environment]::NewLine
$algorithm = $pool.algorithm |out-string
#$algorithm = $algorithm -replace [Environment]::NewLine
$threadconcurrency = $pool."thread-concurrency" |out-string
#$threadconcurrency = $threadconcurrency -replace [Environment]::NewLine
$intensity = $pool.intensity |out-string
#$intensity = $intensity -replace [Environment]::NewLine
#pool spec ends
if($pool.url -like "*nicehash*" -and $pool.url -like "*336*"){
$conf1 = @"
{
"pools": [
{
"name": "$name",
"url": "$url",
"user": "$user",
"pass": "$pass",
"nfactor" : "$nfactor",
"algorithm": "$algorithm",
"thread-concurrency": "$threadconcurrency",
"intensity": "$intensity"
}
],
"failover-only": $failoveronly,
"devices": "$devices",
"lookup-gap": "$lookupgap",
"intensity": "$intensity",
"worksize": "$worksize",
"temp-cutoff": "$tempcutoff",
"temp-overheat": "$tempoverheat",
"gpu-fan" : "$gpufan",
"temp-target": "$temptarget",
"gpu-memdiff": "$gpumemdiff",
"shares": "$shares",
"kernel-path": "$kernelpath",
"auto-fan": $autofan,
"expiry": "$expiry",
"failover-switch-delay": "$failoverswitchdelay",
"gpu-dyninterval": "$gpudyninterval",
"gpu-platform": "$gpuplatform",
"hamsi-expand-big": "$hamsiexpandbig",
"log": "$log",
"no-pool-disable": $nopooldisable,
"no-client-reconnect": $noclientreconnect,
"queue": "$queue",
"scan-time": "$scantime",
"tcp-keepalive": "$tcpkeepalive",
"temp-hysteresis": "$temphysteresis"
}
"@
$conf1 = $conf1 -replace "4336","3336" -replace '"nfactor" : "",' -replace '"nfactor" : ""' -replace '"thread-concurrency": "",' -replace '"thread-concurrency": ""' -replace '"intensity": "",' -replace '"intensity": ""' -replace [Environment]::NewLine -replace " " -replace ',}','}'
$conf1 > 1.conf }
elseif($pool.url -like "*nicehash*" -and $pool.url -like "*337*"){
$conf2 = @"
{
"pools": [
{
"name": "$name",
"url": "$url",
"user": "$user",
"pass": "$pass",
"nfactor" : "$nfactor",
"algorithm": "$algorithm",
"thread-concurrency": "$threadconcurrency",
"intensity": "$intensity"
}
],
"failover-only": $failoveronly,
"devices": "$devices",
"lookup-gap": "$lookupgap",
"intensity": "$intensity",
"worksize": "$worksize",
"temp-cutoff": "$tempcutoff",
"temp-overheat": "$tempoverheat",
"gpu-fan" : "$gpufan",
"temp-target": "$temptarget",
"gpu-memdiff": "$gpumemdiff",
"shares": "$shares",
"kernel-path": "$kernelpath",
"auto-fan": $autofan,
"expiry": "$expiry",
"failover-switch-delay": "$failoverswitchdelay",
"gpu-dyninterval": "$gpudyninterval",
"gpu-platform": "$gpuplatform",
"hamsi-expand-big": "$hamsiexpandbig",
"log": "$log",
"no-pool-disable": $nopooldisable,
"no-client-reconnect": $noclientreconnect,
"queue": "$queue",
"scan-time": "$scantime",
"tcp-keepalive": "$tcpkeepalive",
"temp-hysteresis": "$temphysteresis"
}
"@
$conf2 = $conf2 -replace "4337","3337" -replace '"nfactor" : "",' -replace '"nfactor" : ""' -replace '"thread-concurrency": "",' -replace '"thread-concurrency": ""' -replace '"intensity": "",' -replace '"intensity": ""' -replace [Environment]::NewLine -replace " " -replace ',}','}'
$conf2 > 2.conf
}
elseif($pool.url -like "*nicehash*" -and $pool.url -like "*338*"){
$conf3 = @"
{
"pools": [
{
"name": "$name",
"url": "$url",
"user": "$user",
"pass": "$pass",
"nfactor" : "$nfactor",
"algorithm": "$algorithm",
"thread-concurrency": "$threadconcurrency",
"intensity": "$intensity"
}
],
"failover-only": $failoveronly,
"devices": "$devices",
"lookup-gap": "$lookupgap",
"intensity": "$intensity",
"worksize": "$worksize",
"temp-cutoff": "$tempcutoff",
"temp-overheat": "$tempoverheat",
"gpu-fan" : "$gpufan",
"temp-target": "$temptarget",
"gpu-memdiff": "$gpumemdiff",
"shares": "$shares",
"kernel-path": "$kernelpath",
"auto-fan": $autofan,
"expiry": "$expiry",
"failover-switch-delay": "$failoverswitchdelay",
"gpu-dyninterval": "$gpudyninterval",
"gpu-platform": "$gpuplatform",
"hamsi-expand-big": "$hamsiexpandbig",
"log": "$log",
"no-pool-disable": $nopooldisable,
"no-client-reconnect": $noclientreconnect,
"queue": "$queue",
"scan-time": "$scantime",
"tcp-keepalive": "$tcpkeepalive",
"temp-hysteresis": "$temphysteresis"
}
"@
$conf3 = $conf3 -replace "4338","3338" -replace '"nfactor" : "",' -replace '"nfactor" : ""' -replace '"thread-concurrency": "",' -replace '"thread-concurrency": ""' -replace '"intensity": "",' -replace '"intensity": ""' -replace [Environment]::NewLine -replace " " -replace ',}','}'
$conf3 > 3.conf
}
elseif($pool.url -like "*nicehash*" -and $pool.url -like "*339*"){
$conf4 = @"
{
"pools": [
{
"name": "$name",
"url": "$url",
"user": "$user",
"pass": "$pass",
"nfactor" : "$nfactor",
"algorithm": "$algorithm",
"thread-concurrency": "$threadconcurrency",
"intensity": "$intensity"
}
],
"failover-only": $failoveronly,
"devices": "$devices",
"lookup-gap": "$lookupgap",
"intensity": "$intensity",
"worksize": "$worksize",
"temp-cutoff": "$tempcutoff",
"temp-overheat": "$tempoverheat",
"gpu-fan" : "$gpufan",
"temp-target": "$temptarget",
"gpu-memdiff": "$gpumemdiff",
"shares": "$shares",
"kernel-path": "$kernelpath",
"auto-fan": $autofan,
"expiry": "$expiry",
"failover-switch-delay": "$failoverswitchdelay",
"gpu-dyninterval": "$gpudyninterval",
"gpu-platform": "$gpuplatform",
"hamsi-expand-big": "$hamsiexpandbig",
"log": "$log",
"no-pool-disable": $nopooldisable,
"no-client-reconnect": $noclientreconnect,
"queue": "$queue",
"scan-time": "$scantime",
"tcp-keepalive": "$tcpkeepalive",
"temp-hysteresis": "$temphysteresis"
}
"@
$conf4 = $conf4 -replace "4339","3339" -replace '"nfactor" : "",' -replace '"nfactor" : ""' -replace '"thread-concurrency": "",' -replace '"thread-concurrency": ""' -replace '"intensity": "",' -replace '"intensity": ""' -replace [Environment]::NewLine -replace " " -replace ',}','}'
$conf4 > 4.conf
}
elseif($pool.url -like "*nicehash*" -and $pool.url -like "*340*"){
$conf5 = @"
{
"pools": [
{
"name": "$name",
"url": "$url",
"user": "$user",
"pass": "$pass",
"nfactor" : "$nfactor",
"algorithm": "$algorithm",
"thread-concurrency": "$threadconcurrency",
"intensity": "$intensity"
}
],
"failover-only": $failoveronly,
"devices": "$devices",
"lookup-gap": "$lookupgap",
"intensity": "$intensity",
"worksize": "$worksize",
"temp-cutoff": "$tempcutoff",
"temp-overheat": "$tempoverheat",
"gpu-fan" : "$gpufan",
"temp-target": "$temptarget",
"gpu-memdiff": "$gpumemdiff",
"shares": "$shares",
"kernel-path": "$kernelpath",
"auto-fan": $autofan,
"expiry": "$expiry",
"failover-switch-delay": "$failoverswitchdelay",
"gpu-dyninterval": "$gpudyninterval",
"gpu-platform": "$gpuplatform",
"hamsi-expand-big": "$hamsiexpandbig",
"log": "$log",
"no-pool-disable": $nopooldisable,
"no-client-reconnect": $noclientreconnect,
"queue": "$queue",
"scan-time": "$scantime",
"tcp-keepalive": "$tcpkeepalive",
"temp-hysteresis": "$temphysteresis"
}
"@
$conf5 = $conf5 -replace "4340","3340" -replace '"nfactor" : "",' -replace '"nfactor" : ""' -replace '"thread-concurrency": "",' -replace '"thread-concurrency": ""' -replace '"intensity": "",' -replace '"intensity": ""' -replace [Environment]::NewLine -replace " " -replace ',}','}'
$conf5 > 5.conf
}
elseif($pool.url -like "*waffle*" -and $pool.url -like "*3331*"){
$conf6 = @"
{
"pools": [
{
"name": "$name",
"url": "$url",
"user": "$user",
"pass": "$pass",
"nfactor" : "$nfactor",
"algorithm": "$algorithm",
"thread-concurrency": "$threadconcurrency",
"intensity": "$intensity"
}
],
"failover-only": $failoveronly,
"devices": "$devices",
"lookup-gap": "$lookupgap",
"intensity": "$intensity",
"worksize": "$worksize",
"temp-cutoff": "$tempcutoff",
"temp-overheat": "$tempoverheat",
"gpu-fan" : "$gpufan",
"temp-target": "$temptarget",
"gpu-memdiff": "$gpumemdiff",
"shares": "$shares",
"kernel-path": "$kernelpath",
"auto-fan": $autofan,
"expiry": "$expiry",
"failover-switch-delay": "$failoverswitchdelay",
"gpu-dyninterval": "$gpudyninterval",
"gpu-platform": "$gpuplatform",
"hamsi-expand-big": "$hamsiexpandbig",
"log": "$log",
"no-pool-disable": $nopooldisable,
"no-client-reconnect": $noclientreconnect,
"queue": "$queue",
"scan-time": "$scantime",
"tcp-keepalive": "$tcpkeepalive",
"temp-hysteresis": "$temphysteresis"
}
"@
$conf6 = $conf6 -replace '"nfactor" : "",' -replace '"nfactor" : ""' -replace '"thread-concurrency": "",' -replace '"thread-concurrency": ""' -replace '"intensity": "",' -replace '"intensity": ""' -replace [Environment]::NewLine -replace " " -replace ',}','}'
$conf6 > 6.conf
}
else{
$conf7 = @"
{
"pools": [
{
"name": "$name",
"url": "$url",
"user": "$user",
"pass": "$pass",
"nfactor" : "$nfactor",
"algorithm": "$algorithm",
"thread-concurrency": "$threadconcurrency",
"intensity": "$intensity"
}
],
"failover-only": $failoveronly,
"devices": "$devices",
"lookup-gap": "$lookupgap",
"intensity": "$intensity",
"worksize": "$worksize",
"temp-cutoff": "$tempcutoff",
"temp-overheat": "$tempoverheat",
"gpu-fan" : "$gpufan",
"temp-target": "$temptarget",
"gpu-memdiff": "$gpumemdiff",
"shares": "$shares",
"kernel-path": "$kernelpath",
"auto-fan": $autofan,
"expiry": "$expiry",
"failover-switch-delay": "$failoverswitchdelay",
"gpu-dyninterval": "$gpudyninterval",
"gpu-platform": "$gpuplatform",
"hamsi-expand-big": "$hamsiexpandbig",
"log": "$log",
"no-pool-disable": $nopooldisable,
"no-client-reconnect": $noclientreconnect,
"queue": "$queue",
"scan-time": "$scantime",
"tcp-keepalive": "$tcpkeepalive",
"temp-hysteresis": "$temphysteresis"
}
"@
$conf7 = $conf7 -replace '"nfactor" : "",' -replace '"nfactor" : ""' -replace '"thread-concurrency": "",' -replace '"thread-concurrency": ""' -replace '"intensity": "",' -replace '"intensity": ""' -replace [Environment]::NewLine -replace " " -replace ',}','}'
$conf7 > 7.conf
}
}