I posted a LibraryMSCS on PoshCode that uses cluster.exe and the MSCluster_*
WMI classes. See
http://poshcode.org/724
I use mixture of the custom functions that parse cluster.exe or use the WMI
class with straight cluster.exe commands. Some examples from the library:
#Take all groups offline
$grpArray = @()
get-clustergroup . | where {$_.groupname -notlike "Cluster*"} | foreach
{$grpArray += $_.groupname}
$grpArray | foreach { cluster . group "$_" /offline /wait}
cluster . group /status
#Move group to 1st perferred node:
$prfHash = @{}
Get-ClusterPreferredNode "." | where {$_.order -eq 1} | foreach {
$prfHash[$_.groupname] = $_.node }
$prfHash.keys | foreach { cluster . group "$_" /online:$prfHash."$_" /wait }
cluster . group /status
"Marco Shaw [MVP]" wrote:
> Only Server 2008 R2 comes with clustering cmdlets.
>
> For Server 2008, if you want to automate clustering, you will have to use
> cluster.exe. There's also at least one other interface: either WMI and/or
> COM (I can't remember right now).
>
> Marco
>
> "Franz-Josef" <Franz-Josef@newsgroup> wrote in message
> news:5D3A681F-8A08-418B-9FC4-A518ABFACC7C@newsgroup
> > Hello,
> >
> > I want send Clustercommands, set Ressources Online/Offline, against a
> > Cluster.
> > We are using a Windows 2008 x64 SP2 Server.
> > Unfortunately I didn't find any links in the web to help me for this
> > question.
> >
> > Can anyone help me?
> > * witch Power shell version do I need for this tasks
> > * can you give me some Examples
> >
> > Thaks for your help
> >
> > Franz-Josef
> > > .
>