22 lines
795 B
PowerShell
22 lines
795 B
PowerShell
#Requires -RunAsAdministrator
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$Target = "C:\MinerOpsAgent"
|
|
$Tasks = @(
|
|
"MinerOpsAgent", "MinerOpsAgentTray", "MinerOpsApi3Enrichment", "MinerOpsPoolPoller"
|
|
)
|
|
foreach ($name in $Tasks) {
|
|
Unregister-ScheduledTask -TaskName $name -Confirm:$false -ErrorAction SilentlyContinue
|
|
}
|
|
|
|
$RuntimeFiles = @(
|
|
"MinerOpsAgentService.ps1", "MinerOpsAgentTray.ps1", "MinerOpsAgentGUI.ps1",
|
|
"MinerOpsApi3EnrichmentPoller.ps1", "MinerOpsPoolPoller.ps1",
|
|
"MinerOpsPoolPollerTask.ps1", "EnrichOneMiner.ps1", "MinerOpsControl.ps1",
|
|
"VERSION"
|
|
)
|
|
foreach ($name in $RuntimeFiles) {
|
|
Remove-Item (Join-Path $Target $name) -Force -ErrorAction SilentlyContinue
|
|
}
|
|
Write-Host "MinerOps Agent tasks and code removed. Config, state, logs, and backups were preserved."
|