feat: command to uninstall all agent services (#30)
* feat: command to uninstall all agent services * fix: file extension
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
#Get server and key
|
||||
param($server, $key, $tls)
|
||||
# Download latest release from github
|
||||
if($PSVersionTable.PSVersion.Major -lt 5){
|
||||
Write-Host "Require PS >= 5,your PSVersion:"$PSVersionTable.PSVersion.Major -BackgroundColor DarkGreen -ForegroundColor White
|
||||
@ -82,6 +80,6 @@ Move-Item -Path "C:\temp\nezha-agent.exe" -Destination "C:\nezha\nezha-agent.exe
|
||||
Remove-Item "C:\nezha.zip"
|
||||
Remove-Item "C:\temp" -Recurse
|
||||
#安装部分
|
||||
C:\nezha\nezha-agent.exe service install -s $server -p $key $tls
|
||||
C:\nezha\nezha-agent.exe service install
|
||||
#enjoy
|
||||
Write-Host "Enjoy It!" -BackgroundColor DarkGreen -ForegroundColor Red
|
||||
|
||||
Reference in New Issue
Block a user