Come si utilizza PowerShell per interrompere e avviare un "Servizio generico" in cluster?

StackOverflow https://stackoverflow.com/questions/113737

  •  02-07-2019
  •  | 
  •  

Domanda

Come utilizzare PowerShell per interrompere e avviare un servizio generico " come visto in "Amministrazione cluster" di Microsoft " software?

È stato utile?

Soluzione

Puoi anche usare WMI. Puoi ottenere tutti i servizi generici con:

$services = Get-WmiObject -Computer "Computer" -namespace 'root\mscluster' `
MSCluster_Resource | Where {

Puoi anche usare WMI. Puoi ottenere tutti i servizi generici con:

$timeout = 15
$services[0].TakeOffline($timeout)
$services[0].BringOnline($timeout)

Per interrompere e avviare un servizio:

<*>.Type -eq "Generic Service"}

Per interrompere e avviare un servizio:

<*>

Altri suggerimenti

Si scopre che la risposta è semplicemente usare lo strumento da riga di comando CLUSTER.EXE per fare questo:

cluster RES MyGenericServiceName / OFF

cluster RES MyGenericServiceName / ON

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top