We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 908cdbe commit 000442bCopy full SHA for 000442b
daemon.ps1
@@ -4,7 +4,20 @@ if (!$CreatedMutex) {
4
$mutex.WaitOne()
5
}
6
7
-write-output "Mutex entered. Stopping HPC Services"
+write-output "Mutex entered. Deleting HPC Node"
8
+
9
+try {
10
+ Add-PSSnapin microsoft.hpc
11
+ $hstnm = hostname
12
+ $node = Get-HpcNode -Name $hstnm
13
+ Set-HpcNodeState -Node $node -State offline
14
+ Remove-HpcNode -Node $node
15
+}
16
+catch {
17
+ $_
18
19
20
+write-output "Stopping HPC Service"
21
22
# HPC Head node Service
23
sc.exe stop HpcMonitoringServer
@@ -25,6 +38,8 @@ sc.exe stop HpcBroker
25
38
26
39
# Other HPC service depend on SDM
27
40
sc.exe stop HpcSdm
28
-
41
42
+schtasks /delete /tn mesoshpcdaemon /f
43
29
44
$mutex.ReleaseMutex()
30
45
$mutex.Close()
0 commit comments