001
002 003 004 005 006 007 008 009 010 011 012 013 014 015 |
$Cluster = "Cluster.contoso.com"
$Node = "Node1.contoso.com" Import-Module -Name "FailoverClusters" $VM = Get-WmiObject -Namespace "root/virtualization" ` -Class msvm_computersystem ` -Filter "Caption = 'Virtual Machine'" ` -ComputerName $Node | Select-Object -ExpandProperty "ElementName" $VM | ForEach-Object { Add-ClusterVirtualMachineRole -Cluster $Cluster ` -VirtualMachine $_ | Out-Null } |
001
002 003 004 005 006 |
$Cluster = "Cluster.contoso.corm"
Get-Cluster -Name $Cluster | Get-ClusterResource | Where-Object { $_.ResourceType.Name -eq "Virtual Machine" } | Start-ClusterResource |