VMM: Availability Sets: Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „== Get all Availability Sets == <source lang="powershell">Get-SCAvailabilitySetName</source> == Remove all Availability Sets of a VM == <source lang="powersh…“)
 
 
Zeile 1: Zeile 1:
 
== Get all Availability Sets ==
 
== Get all Availability Sets ==
 
<source lang="powershell">Get-SCAvailabilitySetName</source>
 
<source lang="powershell">Get-SCAvailabilitySetName</source>
 +
 +
== Get all VMs with Availability Sets configured ==
 +
<source lang="powershell">Get-SCVirtualMachine | ? {$_.AvailabilitySetNames -ne $null} | Sort Name | select Name, VMHost, AvailabilitySetNames </source>
  
  

Aktuelle Version vom 5. November 2018, 10:46 Uhr

Get all Availability Sets

Get-SCAvailabilitySetName

Get all VMs with Availability Sets configured

Get-SCVirtualMachine | ? {$_.AvailabilitySetNames -ne $null} | Sort Name | select Name, VMHost, AvailabilitySetNames


Remove all Availability Sets of a VM

$AvailabilitySetNames= @()
Get-SCVirtualMachine <VM-Name> | Set-SCVirtualMachine -AvailabilitySetNames $AvailabilitySetNames


Preferred Owner Nodes

Remove all Preferred Node Owner of a VM

$ClusterPreferredOwner = @()
Get-SCVirtualMachine <VM-Name>  | Set-SCVirtualMachine -ClusterPreferredOwner $ClusterPreferredOwner