From 963f2178ce3c8b1c983345c2aec15736965cdb15 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Peters Date: Mon, 17 Apr 2023 14:47:33 +0200 Subject: [PATCH] Add inclusion in Hyper-V cluster --- CHANGELOG.md | 2 + .../DSC_VMHyperV/DSC_VMHyperV.psm1 | 605 +- .../DSC_VMHyperV/DSC_VMHyperV.schema.mof | 1 + source/DSCResources/DSC_VMHyperV/README.md | 5 + .../en-US/DSC_VMHyperV.strings.psd1 | 3 + tests/Unit/DSC_VMHyperV.Tests.ps1 | 193 +- tests/Unit/Stubs/FailoverClusters.psm1 | 7474 +++++++++++++++++ 7 files changed, 8002 insertions(+), 281 deletions(-) create mode 100644 tests/Unit/Stubs/FailoverClusters.psm1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7184a62..618cb4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md) - Fix multiple DNS IP adresses does not work #190 - NetworkSetting parameter is now optional and no default actions are taken if not specified - Switch to use VM image `windows-latest` to build phase. + VMHyperV + - Enable adding VMs to failover cluster. ## [3.18.0] - 2022-06-04 diff --git a/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.psm1 b/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.psm1 index 112942f..a0d4a9b 100644 --- a/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.psm1 +++ b/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.psm1 @@ -18,7 +18,11 @@ function Get-TargetResource [Parameter(Mandatory = $true)] [System.String] - $VhdPath + $VhdPath, + + [Parameter()] + [System.Boolean] + $IsClustered ) Write-Verbose -Message ($script:localizedData.QueryingVM -f $Name) @@ -29,6 +33,11 @@ function Get-TargetResource throw ($script:localizedData.RoleMissingError -f 'Hyper-V') } + if ($IsClustered -and -not (Get-Module -ListAvailable -Name FailoverClusters -ErrorAction SilentlyContinue)) + { + throw ($script:localizedData.RoleMissingError -f 'FailoverClusters') + } + $vmobj = Get-VM -Name $Name -ErrorAction SilentlyContinue # Check if 1 or 0 VM with name = $name exist @@ -113,6 +122,7 @@ function Get-TargetResource NetworkAdapters = $ipAddress EnableGuestService = ($vmobj | Get-VMIntegrationService | Where-Object -FilterScript { $_.Id -eq $guestServiceId }).Enabled AutomaticCheckpointsEnabled = $vmobj.AutomaticCheckpointsEnabled + IsClustered = $vmobj.IsClustered } } @@ -214,7 +224,12 @@ function Set-TargetResource # Enable AutomaticCheckpoints [Parameter()] [System.Boolean] - $AutomaticCheckpointsEnabled + $AutomaticCheckpointsEnabled, + + # Enable inclusion in running failover cluster if present. + [Parameter()] + [System.Boolean] + $IsClustered ) # Check if Hyper-V module is present for Hyper-V cmdlets @@ -245,354 +260,376 @@ function Set-TargetResource Write-Verbose -Message ($script:localizedData.VMExists -f $Name) # If VM shouldn't be there, stop it and remove it + if ($Ensure -eq 'Absent' -and $IsClustered) + { + $clusterGroup = Get-ClusterGroup -Name $Name -ErrorAction SilentlyContinue + + if ($clusterGroup) + { + Write-Verbose -Message ($script:localizedData.RemoveClusterGroup -f $Name) + Remove-ClusterGroup -RemoveResources -Force -InputObject $clusterGroup + } + } + if ($Ensure -eq 'Absent') { Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'Ensure', $Ensure, 'Present') Get-VM $Name | Stop-VM -Force -Passthru -WarningAction SilentlyContinue | Remove-VM -Force Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'Ensure', $Ensure) + return } <# If VM is present, check its state, startup memory, minimum memory, maximum memory,processor count, automatic checkpoint and mac address One cannot set the VM's vhdpath, path, generation and switchName after creation #> - else + # If state has been specified and the VM is not in right state, set it to right state + if ($State -and ($vmObj.State -ne $State)) { - # If state has been specified and the VM is not in right state, set it to right state - if ($State -and ($vmObj.State -ne $State)) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'State', $State, $vmObj.State) - Set-VMState -Name $Name -State $State -WaitForIP $WaitForIP - Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'State', $State) - } + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'State', $State, $vmObj.State) + Set-VMState -Name $Name -State $State -WaitForIP $WaitForIP + Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'State', $State) + } - $changeProperty = @{ } - # If the VM does not have the right startup memory - if ($PSBoundParameters.ContainsKey('StartupMemory') -and ($vmObj.MemoryStartup -ne $StartupMemory)) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'MemoryStartup', $StartupMemory, $vmObj.MemoryStartup) - $changeProperty['MemoryStartup'] = $StartupMemory - } - elseif ($PSBoundParameters.ContainsKey('MinimumMemory') -and ($vmObj.MemoryStartup -lt $MinimumMemory)) + # If IsClustered is set in configuration + if ($PSBoundParameters.ContainsKey('IsClustered') -and -not $vmObj.IsClustered) + { + Write-Verbose -Message ($script:localizedData.AddingToCluster -f $Name) + $null = Add-ClusterVirtualMachineRole -VMName $Name -Name $Name -WarningAction SilentlyContinue + } + + $changeProperty = @{ } + # If the VM does not have the right startup memory + if ($PSBoundParameters.ContainsKey('StartupMemory') -and ($vmObj.MemoryStartup -ne $StartupMemory)) + { + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'MemoryStartup', $StartupMemory, $vmObj.MemoryStartup) + $changeProperty['MemoryStartup'] = $StartupMemory + } + elseif ($PSBoundParameters.ContainsKey('MinimumMemory') -and ($vmObj.MemoryStartup -lt $MinimumMemory)) + { + Write-Verbose -Message ($script:localizedData.AdjustingLessThanMemoryWarning -f 'StartupMemory', $vmObj.MemoryStartup, 'MinimumMemory', $MinimumMemory) + $changeProperty['MemoryStartup'] = $MinimumMemory + } + elseif ($PSBoundParameters.ContainsKey('MaximumMemory') -and ($vmObj.MemoryStartup -gt $MaximumMemory)) + { + Write-Verbose -Message ($script:localizedData.AdjustingGreaterThanMemoryWarning -f 'StartupMemory', $vmObj.MemoryStartup, 'MaximumMemory', $MaximumMemory) + $changeProperty['MemoryStartup'] = $MaximumMemory + } + + # If the VM does not have the right minimum or maximum memory, stop the VM, set the right memory, start the VM + if ($PSBoundParameters.ContainsKey('MinimumMemory') -or $PSBoundParameters.ContainsKey('MaximumMemory')) + { + $changeProperty['DynamicMemory'] = $true + $changeProperty['StaticMemory'] = $false + + if ($PSBoundParameters.ContainsKey('MinimumMemory') -and ($vmObj.Memoryminimum -ne $MinimumMemory)) { - Write-Verbose -Message ($script:localizedData.AdjustingLessThanMemoryWarning -f 'StartupMemory', $vmObj.MemoryStartup, 'MinimumMemory', $MinimumMemory) - $changeProperty['MemoryStartup'] = $MinimumMemory + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'MinimumMemory', $MinimumMemory, $vmObj.MemoryMinimum) + $changeProperty['MemoryMinimum'] = $MinimumMemory } - elseif ($PSBoundParameters.ContainsKey('MaximumMemory') -and ($vmObj.MemoryStartup -gt $MaximumMemory)) + if ($PSBoundParameters.ContainsKey('MaximumMemory') -and ($vmObj.Memorymaximum -ne $MaximumMemory)) { - Write-Verbose -Message ($script:localizedData.AdjustingGreaterThanMemoryWarning -f 'StartupMemory', $vmObj.MemoryStartup, 'MaximumMemory', $MaximumMemory) - $changeProperty['MemoryStartup'] = $MaximumMemory + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'MaximumMemory', $MaximumMemory, $vmObj.MemoryMaximum) + $changeProperty['MemoryMaximum'] = $MaximumMemory } + } - # If the VM does not have the right minimum or maximum memory, stop the VM, set the right memory, start the VM - if ($PSBoundParameters.ContainsKey('MinimumMemory') -or $PSBoundParameters.ContainsKey('MaximumMemory')) - { - $changeProperty['DynamicMemory'] = $true - $changeProperty['StaticMemory'] = $false - - if ($PSBoundParameters.ContainsKey('MinimumMemory') -and ($vmObj.Memoryminimum -ne $MinimumMemory)) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'MinimumMemory', $MinimumMemory, $vmObj.MemoryMinimum) - $changeProperty['MemoryMinimum'] = $MinimumMemory - } - if ($PSBoundParameters.ContainsKey('MaximumMemory') -and ($vmObj.Memorymaximum -ne $MaximumMemory)) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'MaximumMemory', $MaximumMemory, $vmObj.MemoryMaximum) - $changeProperty['MemoryMaximum'] = $MaximumMemory - } - } + # If the VM does not have the right processor count, stop the VM, set the right memory, start the VM + if ($PSBoundParameters.ContainsKey('ProcessorCount') -and ($vmObj.ProcessorCount -ne $ProcessorCount)) + { + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'ProcessorCount', $ProcessorCount, $vmObj.ProcessorCount) + $changeProperty['ProcessorCount'] = $ProcessorCount + } - # If the VM does not have the right processor count, stop the VM, set the right memory, start the VM - if ($PSBoundParameters.ContainsKey('ProcessorCount') -and ($vmObj.ProcessorCount -ne $ProcessorCount)) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'ProcessorCount', $ProcessorCount, $vmObj.ProcessorCount) - $changeProperty['ProcessorCount'] = $ProcessorCount - } + # Stop the VM, set the right properties, start the VM only if there are properties to change + if ($changeProperty.Count -gt 0) + { + Set-VMProperty -Name $Name -VMCommand 'Set-VM' -ChangeProperty $changeProperty -WaitForIP $WaitForIP -RestartIfNeeded $RestartIfNeeded + Write-Verbose -Message ($script:localizedData.VMPropertiesUpdated -f $Name) + } - # Stop the VM, set the right properties, start the VM only if there are properties to change - if ($changeProperty.Count -gt 0) + <# + Special cases to disable dynamic memory: + - If startup, minimum and maximum memory are specified with equal values or + - If only startup memory is specified, but neither minimum nor maximum + #> + if ( ($PSBoundParameters.ContainsKey('StartupMemory') -and + ($StartupMemory -eq $MinimumMemory) -and + ($StartupMemory -eq $MaximumMemory) + ) -or + ( $PSBoundParameters.ContainsKey('StartupMemory') -and + (-not $PSBoundParameters.ContainsKey('MinimumMemory')) -and + (-not $PSBoundParameters.ContainsKey('MaximumMemory')) + ) + ) + { + # Refresh VM properties + $vmObj = Get-VM -Name $Name -ErrorAction SilentlyContinue + if ($vmObj.DynamicMemoryEnabled) { - Set-VMProperty -Name $Name -VMCommand 'Set-VM' -ChangeProperty $changeProperty -WaitForIP $WaitForIP -RestartIfNeeded $RestartIfNeeded + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'DynamicMemoryEnabled', $false, $vmObj.DynamicMemoryEnabled) + $setVMPropertyParams = @{ + VMName = $Name + VMCommand = 'Set-VM' + ChangeProperty = @{ + StaticMemory = $true + DynamicMemory = $false + } + WaitForIP = $WaitForIP + RestartIfNeeded = $RestartIfNeeded + } + Set-VMProperty @setVMPropertyParams Write-Verbose -Message ($script:localizedData.VMPropertiesUpdated -f $Name) } + } - <# - Special cases to disable dynamic memory: - - If startup, minimum and maximum memory are specified with equal values or - - If only startup memory is specified, but neither minimum nor maximum - #> - if ( ($PSBoundParameters.ContainsKey('StartupMemory') -and - ($StartupMemory -eq $MinimumMemory) -and - ($StartupMemory -eq $MaximumMemory) - ) -or - ( $PSBoundParameters.ContainsKey('StartupMemory') -and - (-not $PSBoundParameters.ContainsKey('MinimumMemory')) -and - (-not $PSBoundParameters.ContainsKey('MaximumMemory')) - ) - ) + # Set VM network switches. This can be done while the VM is running. + for ($i = 0; $i -lt $SwitchName.Count; $i++) + { + $switch = $SwitchName[$i] + $nic = $vmObj.NetworkAdapters[$i] + if ($nic) { - # Refresh VM properties - $vmObj = Get-VM -Name $Name -ErrorAction SilentlyContinue - if ($vmObj.DynamicMemoryEnabled) + # We cannot change the MAC address whilst the VM is running.. This is changed later + if ($nic.SwitchName -ne $switch) { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'DynamicMemoryEnabled', $false, $vmObj.DynamicMemoryEnabled) - $setVMPropertyParams = @{ - VMName = $Name - VMCommand = 'Set-VM' - ChangeProperty = @{ - StaticMemory = $true - DynamicMemory = $false - } - WaitForIP = $WaitForIP - RestartIfNeeded = $RestartIfNeeded - } - Set-VMProperty @setVMPropertyParams - Write-Verbose -Message ($script:localizedData.VMPropertiesUpdated -f $Name) + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'NIC', $switch, $nic.SwitchName) + $nic | Connect-VMNetworkAdapter -SwitchName $switch + Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'NIC', $switch) } } - - # Set VM network switches. This can be done while the VM is running. - for ($i = 0; $i -lt $SwitchName.Count; $i++) + else { - $switch = $SwitchName[$i] - $nic = $vmObj.NetworkAdapters[$i] - if ($nic) + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'NIC', $switch, '') + if ($MACAddress -and (-not [System.String]::IsNullOrEmpty($MACAddress[$i]))) { - # We cannot change the MAC address whilst the VM is running.. This is changed later - if ($nic.SwitchName -ne $switch) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'NIC', $switch, $nic.SwitchName) - $nic | Connect-VMNetworkAdapter -SwitchName $switch - Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'NIC', $switch) - } + Add-VMNetworkAdapter -VMName $Name -SwitchName $switch -StaticMacAddress $MACAddress[$i] + Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'NIC', $switch) } else { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'NIC', $switch, '') - if ($MACAddress -and (-not [System.String]::IsNullOrEmpty($MACAddress[$i]))) - { - Add-VMNetworkAdapter -VMName $Name -SwitchName $switch -StaticMacAddress $MACAddress[$i] - Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'NIC', $switch) - } - else - { - Add-VMNetworkAdapter -VMName $Name -SwitchName $switch - Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'NIC', $switch) - } - # Refresh the NICs after we've added one - $vmObj = Get-VM -Name $Name -ErrorAction SilentlyContinue + Add-VMNetworkAdapter -VMName $Name -SwitchName $switch + Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'NIC', $switch) } + # Refresh the NICs after we've added one + $vmObj = Get-VM -Name $Name -ErrorAction SilentlyContinue } + } - # If the VM does not have the right MACAddress, stop the VM, set the right MACAddress, start the VM - for ($i = 0; $i -lt $MACAddress.Count; $i++) + # If the VM does not have the right MACAddress, stop the VM, set the right MACAddress, start the VM + for ($i = 0; $i -lt $MACAddress.Count; $i++) + { + $address = $MACAddress[$i] + $nic = $vmObj.NetworkAdapters[$i] + if ($nic.MacAddress -ne $address) { - $address = $MACAddress[$i] - $nic = $vmObj.NetworkAdapters[$i] - if ($nic.MacAddress -ne $address) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'MACAddress', $address, $nic.MacAddress) - Set-VMMACAddress -Name $Name -NICIndex $i -MACAddress $address -WaitForIP $WaitForIP -RestartIfNeeded $RestartIfNeeded - } + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'MACAddress', $address, $nic.MacAddress) + Set-VMMACAddress -Name $Name -NICIndex $i -MACAddress $address -WaitForIP $WaitForIP -RestartIfNeeded $RestartIfNeeded } + } - if ($Generation -eq 2) + if ($Generation -eq 2) + { + # Retrive the current secure boot state + $vmSecureBoot = Test-VMSecureBoot -Name $Name + if ($SecureBoot -ne $vmSecureBoot) { - # Retrive the current secure boot state - $vmSecureBoot = Test-VMSecureBoot -Name $Name - if ($SecureBoot -ne $vmSecureBoot) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'SecureBoot', $SecureBoot, $vmSecureBoot) + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'SecureBoot', $SecureBoot, $vmSecureBoot) - if (-not $SecureBoot) - { - $enableSecureBoot = 'On' - } - else - { - $enableSecureBoot = 'Off' - } + if (-not $SecureBoot) + { + $enableSecureBoot = 'On' + } + else + { + $enableSecureBoot = 'Off' + } - # Cannot change the secure boot state whilst the VM is powered on. - $setVMPropertyParams = @{ - VMName = $Name - VMCommand = 'Set-VMFirmware' - ChangeProperty = @{ - EnableSecureBoot = $enableSecureBoot - } - RestartIfNeeded = $RestartIfNeeded + # Cannot change the secure boot state whilst the VM is powered on. + $setVMPropertyParams = @{ + VMName = $Name + VMCommand = 'Set-VMFirmware' + ChangeProperty = @{ + EnableSecureBoot = $enableSecureBoot } - Set-VMProperty @setVMPropertyParams - Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'SecureBoot', $SecureBoot) + RestartIfNeeded = $RestartIfNeeded } + Set-VMProperty @setVMPropertyParams + Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'SecureBoot', $SecureBoot) } + } - if ($Notes -ne $null) + if ($Notes -ne $null) + { + # If the VM notes do not match the desire notes, update them. This can be done while the VM is running. + if ($vmObj.Notes -ne $Notes) { - # If the VM notes do not match the desire notes, update them. This can be done while the VM is running. - if ($vmObj.Notes -ne $Notes) - { - Set-Vm -Name $Name -Notes $Notes - } + Set-Vm -Name $Name -Notes $Notes } + } - # If the VM doesn't have Guest Service Interface correctly configured, update it. - $guestServiceId = 'Microsoft:{0}\6C09BB55-D683-4DA0-8931-C9BF705F6480' -f $vmObj.Id + # If the VM doesn't have Guest Service Interface correctly configured, update it. + $guestServiceId = 'Microsoft:{0}\6C09BB55-D683-4DA0-8931-C9BF705F6480' -f $vmObj.Id - $guestService = $vmObj | Get-VMIntegrationService | Where-Object -FilterScript { $_.Id -eq $guestServiceId } - if ($guestService.Enabled -eq $false -and $EnableGuestService) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'EnableGuestService', $EnableGuestService, $guestService.Enabled) - $guestService | Enable-VMIntegrationService - Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'EnableGuestService', $EnableGuestService) - } - elseif ($guestService.Enabled -and -not $EnableGuestService) - { - Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'EnableGuestService', $EnableGuestService, $guestService.Enabled) - $guestService | Disable-VMIntegrationService - Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'EnableGuestService', $EnableGuestService) - } + $guestService = $vmObj | Get-VMIntegrationService | Where-Object -FilterScript { $_.Id -eq $guestServiceId } + if ($guestService.Enabled -eq $false -and $EnableGuestService) + { + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'EnableGuestService', $EnableGuestService, $guestService.Enabled) + $guestService | Enable-VMIntegrationService + Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'EnableGuestService', $EnableGuestService) + } + elseif ($guestService.Enabled -and -not $EnableGuestService) + { + Write-Verbose -Message ($script:localizedData.VMPropertyShouldBe -f 'EnableGuestService', $EnableGuestService, $guestService.Enabled) + $guestService | Disable-VMIntegrationService + Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'EnableGuestService', $EnableGuestService) + } - # If AutomaticCheckpointsEnabled is set in configuration - if ($PSBoundParameters.ContainsKey('AutomaticCheckpointsEnabled')) + # If AutomaticCheckpointsEnabled is set in configuration + if ($PSBoundParameters.ContainsKey('AutomaticCheckpointsEnabled')) + { + if ($vmObj.AutomaticCheckpointsEnabled -ne $AutomaticCheckpointsEnabled) { - if ($vmObj.AutomaticCheckpointsEnabled -ne $AutomaticCheckpointsEnabled) - { - Set-VM -Name $Name -AutomaticCheckpointsEnabled $AutomaticCheckpointsEnabled - } + Set-VM -Name $Name -AutomaticCheckpointsEnabled $AutomaticCheckpointsEnabled } } + + return } # VM is not present, create one - else + if ($Ensure -eq 'Absent') { - Write-Verbose -Message ($script:localizedData.VMDoesNotExist -f $Name) - if ($Ensure -eq 'Present') - { - Write-Verbose -Message ($script:localizedData.CreatingVM -f $Name) + return + } + Write-Verbose -Message ($script:localizedData.VMDoesNotExist -f $Name) + Write-Verbose -Message ($script:localizedData.CreatingVM -f $Name) - $parameters = @{ } - $parameters['Name'] = $Name - $parameters['VHDPath'] = $VhdPath - $parameters['Generation'] = $Generation + $parameters = @{ } + $parameters['Name'] = $Name + $parameters['VHDPath'] = $VhdPath + $parameters['Generation'] = $Generation - # Optional parameters - if ($SwitchName) - { - $parameters['SwitchName'] = $SwitchName[0] - } - if ($Path) - { - $parameters['Path'] = $Path - } - $defaultStartupMemory = 512MB - if ($PSBoundParameters.ContainsKey('StartupMemory')) - { - $parameters['MemoryStartupBytes'] = $StartupMemory - } - elseif ($PSBoundParameters.ContainsKey('MinimumMemory') -and ($defaultStartupMemory -lt $MinimumMemory)) - { - $parameters['MemoryStartupBytes'] = $MinimumMemory - } - elseif ($PSBoundParameters.ContainsKey('MaximumMemory') -and ($defaultStartupMemory -gt $MaximumMemory)) - { - $parameters['MemoryStartupBytes'] = $MaximumMemory - } - $null = New-VM @parameters + # Optional parameters + if ($SwitchName) + { + $parameters['SwitchName'] = $SwitchName[0] + } + if ($Path) + { + $parameters['Path'] = $Path + } + $defaultStartupMemory = 512MB + if ($PSBoundParameters.ContainsKey('StartupMemory')) + { + $parameters['MemoryStartupBytes'] = $StartupMemory + } + elseif ($PSBoundParameters.ContainsKey('MinimumMemory') -and ($defaultStartupMemory -lt $MinimumMemory)) + { + $parameters['MemoryStartupBytes'] = $MinimumMemory + } + elseif ($PSBoundParameters.ContainsKey('MaximumMemory') -and ($defaultStartupMemory -gt $MaximumMemory)) + { + $parameters['MemoryStartupBytes'] = $MaximumMemory + } + $null = New-VM @parameters - $parameters = @{ } - $parameters['Name'] = $Name - $parameters['StaticMemory'] = $true - $parameters['DynamicMemory'] = $false - if ($PSBoundParameters.ContainsKey('MinimumMemory') -or $PSBoundParameters.ContainsKey('MaximumMemory')) - { - $parameters['DynamicMemory'] = $true - $parameters['StaticMemory'] = $false - if ($PSBoundParameters.ContainsKey('MinimumMemory')) - { - $parameters['MemoryMinimumBytes'] = $MinimumMemory - } - if ($PSBoundParameters.ContainsKey('MaximumMemory')) - { - $parameters['MemoryMaximumBytes'] = $MaximumMemory - } - } + # If IsClustered is set in configuration + if ($PSBoundParameters.ContainsKey('IsClustered') -and -not $vmObj.IsClustered) + { + Write-Verbose -Message ($script:localizedData.AddingToCluster -f $Name) + $null = Add-ClusterVirtualMachineRole -VMName $Name -Name $Name -WarningAction SilentlyContinue + } - if ($Notes) - { - $parameters['Notes'] = $Notes - } + $parameters = @{ } + $parameters['Name'] = $Name + $parameters['StaticMemory'] = $true + $parameters['DynamicMemory'] = $false + if ($PSBoundParameters.ContainsKey('MinimumMemory') -or $PSBoundParameters.ContainsKey('MaximumMemory')) + { + $parameters['DynamicMemory'] = $true + $parameters['StaticMemory'] = $false + if ($PSBoundParameters.ContainsKey('MinimumMemory')) + { + $parameters['MemoryMinimumBytes'] = $MinimumMemory + } + if ($PSBoundParameters.ContainsKey('MaximumMemory')) + { + $parameters['MemoryMaximumBytes'] = $MaximumMemory + } + } - if ($PSBoundParameters.ContainsKey('ProcessorCount')) - { - $parameters['ProcessorCount'] = $ProcessorCount - } + if ($Notes) + { + $parameters['Notes'] = $Notes + } - # If AutomaticCheckpointsEnabled is set in configuration - if ($PSBoundParameters.ContainsKey('AutomaticCheckpointsEnabled')) - { - $parameters['AutomaticCheckpointsEnabled'] = $AutomaticCheckpointsEnabled - } + if ($PSBoundParameters.ContainsKey('ProcessorCount')) + { + $parameters['ProcessorCount'] = $ProcessorCount + } - $null = Set-VM @parameters + # If AutomaticCheckpointsEnabled is set in configuration + if ($PSBoundParameters.ContainsKey('AutomaticCheckpointsEnabled')) + { + $parameters['AutomaticCheckpointsEnabled'] = $AutomaticCheckpointsEnabled + } - # Special case: Disable dynamic memory if startup, minimum and maximum memory are equal - if ($PSBoundParameters.ContainsKey('StartupMemory') -and - ($StartupMemory -eq $MinimumMemory) -and - ($StartupMemory -eq $MaximumMemory)) - { - Set-VMMemory -VMName $Name -DynamicMemoryEnabled $false - } + $null = Set-VM @parameters - # There's always a NIC added with New-VM - if ($MACAddress) - { - Set-VMNetworkAdapter -VMName $Name -StaticMacAddress $MACAddress[0] - } + # Special case: Disable dynamic memory if startup, minimum and maximum memory are equal + if ($PSBoundParameters.ContainsKey('StartupMemory') -and + ($StartupMemory -eq $MinimumMemory) -and + ($StartupMemory -eq $MaximumMemory)) + { + Set-VMMemory -VMName $Name -DynamicMemoryEnabled $false + } - # Add additional NICs - for ($i = 1; $i -lt $SwitchName.Count; $i++) - { - $addVMNetworkAdapterParams = @{ - VMName = $Name - SwitchName = $SwitchName[$i] - } - if ($MACAddress -and (-not [System.String]::IsNullOrEmpty($MACAddress[$i]))) - { - $addVMNetworkAdapterParams['StaticMacAddress'] = $MACAddress[$i] - } - Add-VMNetworkAdapter @addVMNetworkAdapterParams - Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'NIC', $SwitchName[$i]) - } + # There's always a NIC added with New-VM + if ($MACAddress) + { + Set-VMNetworkAdapter -VMName $Name -StaticMacAddress $MACAddress[0] + } - if ($Generation -eq 2) - { - <# - Secure boot is only applicable to Generation 2 VMs and it defaults to on. - Therefore, we only need to explicitly set it to off if specified. - #> - if ($SecureBoot -eq $false) - { - Set-VMFirmware -VMName $Name -EnableSecureBoot Off - } - } + # Add additional NICs + for ($i = 1; $i -lt $SwitchName.Count; $i++) + { + $addVMNetworkAdapterParams = @{ + VMName = $Name + SwitchName = $SwitchName[$i] + } + if ($MACAddress -and (-not [System.String]::IsNullOrEmpty($MACAddress[$i]))) + { + $addVMNetworkAdapterParams['StaticMacAddress'] = $MACAddress[$i] + } + Add-VMNetworkAdapter @addVMNetworkAdapterParams + Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'NIC', $SwitchName[$i]) + } - if ($EnableGuestService) - { - $guestServiceId = 'Microsoft:{0}\6C09BB55-D683-4DA0-8931-C9BF705F6480' -f (Get-VM -Name $Name).Id - Get-VMIntegrationService -VMName $Name | Where-Object -FilterScript { $_.Id -eq $guestServiceId } | Enable-VMIntegrationService - } + if ($Generation -eq 2) + { + <# + Secure boot is only applicable to Generation 2 VMs and it defaults to on. + Therefore, we only need to explicitly set it to off if specified. + #> + if ($SecureBoot -eq $false) + { + Set-VMFirmware -VMName $Name -EnableSecureBoot Off + } + } - Write-Verbose -Message ($script:localizedData.VMCreated -f $Name) + if ($EnableGuestService) + { + $guestServiceId = 'Microsoft:{0}\6C09BB55-D683-4DA0-8931-C9BF705F6480' -f (Get-VM -Name $Name).Id + Get-VMIntegrationService -VMName $Name | Where-Object -FilterScript { $_.Id -eq $guestServiceId } | Enable-VMIntegrationService + } - if ($State) - { - Set-VMState -Name $Name -State $State -WaitForIP $WaitForIP - Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'State', $State) - } + Write-Verbose -Message ($script:localizedData.VMCreated -f $Name) - } + if ($State) + { + Set-VMState -Name $Name -State $State -WaitForIP $WaitForIP + Write-Verbose -Message ($script:localizedData.VMPropertySet -f 'State', $State) } } @@ -694,7 +731,12 @@ function Test-TargetResource # Enable AutomaticCheckpoints [Parameter()] [System.Boolean] - $AutomaticCheckpointsEnabled + $AutomaticCheckpointsEnabled, + + # Enable inclusion in running failover cluster if present. + [Parameter()] + [System.Boolean] + $IsClustered ) # Check if Hyper-V module is present for Hyper-V cmdlets @@ -884,6 +926,13 @@ function Test-TargetResource } } + # If IsClustered is set in configuration + if ($PSBoundParameters.ContainsKey('IsClustered') -and -not $vmObj.IsClustered) + { + Write-Verbose -Message ($script:localizedData.NotAddedToCluster -f $vmObj.Name) + return $false + } + return $true } else diff --git a/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.schema.mof b/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.schema.mof index 8416488..f4e29e8 100644 --- a/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.schema.mof +++ b/source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.schema.mof @@ -19,6 +19,7 @@ class DSC_VMHyperV : OMI_BaseResource [Write, Description("Specifies if Secure Boot should be enabled for Generation 2 virtual machines. **Only supports generation 2 virtual machines**. Default value is `$true`.")] Boolean SecureBoot; [Write, Description("Enable Guest Service Interface for the VM. The default value is `$false`.")] Boolean EnableGuestService; [Write, Description("Enable AutomaticCheckpoints for the VM.")] Boolean AutomaticCheckpointsEnabled; + [Write, Description("Enable inclusion in running failover cluster if present.")] Boolean IsClustered; [Read, Description("Returns the unique ID for the VM.")] String ID; [Read, Description("Returns the current status of the VM.")] String Status; [Read, Description("Returns the current CPU usage of the VM.")] Uint32 CPUUsage; diff --git a/source/DSCResources/DSC_VMHyperV/README.md b/source/DSCResources/DSC_VMHyperV/README.md index 5f10c9b..b65e1d4 100644 --- a/source/DSCResources/DSC_VMHyperV/README.md +++ b/source/DSCResources/DSC_VMHyperV/README.md @@ -8,7 +8,12 @@ The following properties **cannot** be changed after VM creation: * Path * Generation +If IsClustered is enabled, please use PsDscRunAsCredential with a +privileged account in order to add a VM to the cluster that the +Hyper-V host is a member of. + ## Requirements * The Hyper-V Role has to be installed on the machine. * The Hyper-V PowerShell module has to be installed on the machine. +* If VMs should be added to a Failover Cluster, the FailoverClusters module needs to be installed on the machine. diff --git a/source/DSCResources/DSC_VMHyperV/en-US/DSC_VMHyperV.strings.psd1 b/source/DSCResources/DSC_VMHyperV/en-US/DSC_VMHyperV.strings.psd1 index 11ea1ee..56522b8 100644 --- a/source/DSCResources/DSC_VMHyperV/en-US/DSC_VMHyperV.strings.psd1 +++ b/source/DSCResources/DSC_VMHyperV/en-US/DSC_VMHyperV.strings.psd1 @@ -21,4 +21,7 @@ ConvertFrom-StringData @' VMPropertySet = VM property '{0}' is '{1}'. VMPropertiesUpdated = VM '{0}' properties have been updated. QueryingVM = Querying VM '{0}'. + NotAddedToCluster = VM '{0}' does not appear to be added as a cluster role when it should be. + RemoveClusterGroup = Removing VM '{0}' from cluster. + AddingToCluster = Adding VM '{0}' to cluster. '@ diff --git a/tests/Unit/DSC_VMHyperV.Tests.ps1 b/tests/Unit/DSC_VMHyperV.Tests.ps1 index 13097b0..13a49b8 100644 --- a/tests/Unit/DSC_VMHyperV.Tests.ps1 +++ b/tests/Unit/DSC_VMHyperV.Tests.ps1 @@ -20,6 +20,7 @@ function Invoke-TestSetup # Import the stub functions. Import-Module -Name "$PSScriptRoot/Stubs/Hyper-V.stubs.psm1" -Force + Import-Module -Name "$PSScriptRoot/Stubs/FailoverClusters" -Force } function Invoke-TestCleanup @@ -32,7 +33,7 @@ Invoke-TestSetup try { InModuleScope $script:dscResourceName { - Describe 'xVMHyper-V' { + Describe 'VMHyperV' { $null = New-Item -Path 'TestDrive:\TestVM.vhdx' -ItemType File $null = New-Item -Path 'TestDrive:\TestVM.vhd' -ItemType File @@ -80,6 +81,7 @@ try $stubVM.DynamicMemoryEnabled = $true $stubVM.Notes = '' $stubVM.State = 'Running' + $stubVM.IsClustered = $false $stubVM.NetworkAdapters = @( $stubNIC1, $stubNIC2 @@ -109,6 +111,7 @@ try $stubVM.DynamicMemoryEnabled = $true $stubVM.Notes = '' $stubVM.State = 'Off' + $stubVM.IsClustered = $false $stubVM.NetworkAdapters = @( $stubNIC1, $stubNIC2 @@ -138,6 +141,7 @@ try $stubVM.DynamicMemoryEnabled = $true $stubVM.Notes = '' $stubVM.State = 'Paused' + $stubVM.IsClustered = $false $stubVM.NetworkAdapters = @( $stubNIC1, $stubNIC2 @@ -171,6 +175,7 @@ try $stubVM1.DynamicMemoryEnabled = $true $stubVM1.Notes = '' $stubVM1.State = 'Off' + $stubVM.IsClustered = $false $stubVM1.NetworkAdapters = @( $stubNIC1, $stubNIC2 @@ -227,6 +232,7 @@ try $stubVM.DynamicMemoryEnabled = $true $stubVM.Notes = '' $stubVM.State = 'Running' + $stubVM.IsClustered = $false $stubVM.NetworkAdapters = @( $stubNIC1, $stubNIC2 @@ -255,6 +261,7 @@ try $stubVM.DynamicMemoryEnabled = $true $stubVM.Notes = '' $stubVM.State = 'Running' + $stubVM.IsClustered = $false $stubVM.NetworkAdapters = @( $stubNIC1, $stubNIC2 @@ -283,6 +290,7 @@ try $stubVM.DynamicMemoryEnabled = $true $stubVM.Notes = '' $stubVM.State = 'Running' + $stubVM.IsClustered = $false $stubVM.AutomaticCheckpointsEnabled = $true $stubVM.NetworkAdapters = @( $stubNIC1, @@ -312,6 +320,7 @@ try $stubVM.DynamicMemoryEnabled = $true $stubVM.Notes = '' $stubVM.State = 'Running' + $stubVM.IsClustered = $false $stubVM.AutomaticCheckpointsEnabled = $false $stubVM.NetworkAdapters = @( $stubNIC1, @@ -341,6 +350,127 @@ try $stubVM.DynamicMemoryEnabled = $true $stubVM.Notes = '' $stubVM.State = 'Running' + $stubVM.IsClustered = $false + $stubVM.NetworkAdapters = @( + $stubNIC1, + $stubNIC2 + ) + + return $stubVM + } + + Mock -CommandName Get-VM -ParameterFilter { $Name -eq 'ClusteredExistingVmNotInClusterPresent' } -MockWith { + $stubVM = [Microsoft.HyperV.PowerShell.VirtualMachine]::CreateTypeInstance() + $stubVM.Name = 'ClusteredExistingVmNotInClusterPresent' + $stubVM.HardDrives = @( + $stubVhdxDisk, + $stubVhdDisk + ) + $stubVM.Path = $StubVMConfig.FullPath + $stubVM.Generation = 1 + $stubVM.MemoryStartup = 512MB + $stubVM.MemoryMinimum = 128MB + $stubVM.MemoryMaximum = 4096MB + $stubVM.ProcessorCount = 1 + $stubVM.ID = $mockVmGuid + $stubVM.CPUUsage = 10 + $stubVM.MemoryAssigned = 512MB + $stubVM.Uptime = New-TimeSpan -Hours 12 + $stubVM.CreationTime = (Get-Date).AddHours(-12) + $stubVM.DynamicMemoryEnabled = $true + $stubVM.Notes = '' + $stubVM.State = 'Running' + $stubVM.IsClustered = $false + $stubVM.NetworkAdapters = @( + $stubNIC1, + $stubNIC2 + ) + + return $stubVM + } + + Mock -CommandName Get-VM -ParameterFilter { $Name -eq 'ClusteredExistingVmInClusterPresent' } -MockWith { + $stubVM = [Microsoft.HyperV.PowerShell.VirtualMachine]::CreateTypeInstance() + $stubVM.Name = 'ClusteredExistingVmInClusterPresent' + $stubVM.HardDrives = @( + $stubVhdxDisk, + $stubVhdDisk + ) + $stubVM.Path = $StubVMConfig.FullPath + $stubVM.Generation = 1 + $stubVM.MemoryStartup = 512MB + $stubVM.MemoryMinimum = 128MB + $stubVM.MemoryMaximum = 4096MB + $stubVM.ProcessorCount = 1 + $stubVM.ID = $mockVmGuid + $stubVM.CPUUsage = 10 + $stubVM.MemoryAssigned = 512MB + $stubVM.Uptime = New-TimeSpan -Hours 12 + $stubVM.CreationTime = (Get-Date).AddHours(-12) + $stubVM.DynamicMemoryEnabled = $true + $stubVM.Notes = '' + $stubVM.State = 'Running' + $stubVM.IsClustered = $true + $stubVM.NetworkAdapters = @( + $stubNIC1, + $stubNIC2 + ) + + return $stubVM + } + + Mock -CommandName Get-VM -ParameterFilter { $Name -eq 'ClusteredNewVmPresent' } -MockWith { + $stubVM = [Microsoft.HyperV.PowerShell.VirtualMachine]::CreateTypeInstance() + $stubVM.Name = 'ClusteredNewVmPresent' + $stubVM.HardDrives = @( + $stubVhdxDisk, + $stubVhdDisk + ) + $stubVM.Path = $StubVMConfig.FullPath + $stubVM.Generation = 1 + $stubVM.MemoryStartup = 512MB + $stubVM.MemoryMinimum = 128MB + $stubVM.MemoryMaximum = 4096MB + $stubVM.ProcessorCount = 1 + $stubVM.ID = $mockVmGuid + $stubVM.CPUUsage = 10 + $stubVM.MemoryAssigned = 512MB + $stubVM.Uptime = New-TimeSpan -Hours 12 + $stubVM.CreationTime = (Get-Date).AddHours(-12) + $stubVM.DynamicMemoryEnabled = $true + $stubVM.Notes = '' + $stubVM.State = 'Running' + $stubVM.IsClustered = $false + $stubVM.NetworkAdapters = @( + $stubNIC1, + $stubNIC2 + ) + + return $stubVM + } + + Mock -CommandName Get-VM -ParameterFilter { $Name -eq 'ClusteredExistingVmInClusterAbsent' } -MockWith { + $stubVM = [Microsoft.HyperV.PowerShell.VirtualMachine]::CreateTypeInstance() + $stubVM.Name = 'ClusteredExistingVmInClusterAbsent' + $stubVM.HardDrives = @( + $stubVhdxDisk, + $stubVhdDisk + ) + $stubVM.Path = $StubVMConfig.FullPath + $stubVM.Generation = 1 + $stubVM.MemoryStartup = 512MB + $stubVM.MemoryMinimum = 128MB + $stubVM.MemoryMaximum = 4096MB + $stubVM.ProcessorCount = 1 + $stubVM.ID = $mockVmGuid + $stubVM.CPUUsage = 10 + $stubVM.MemoryAssigned = 512MB + $stubVM.Uptime = New-TimeSpan -Hours 12 + $stubVM.CreationTime = (Get-Date).AddHours(-12) + $stubVM.DynamicMemoryEnabled = $true + $stubVM.Notes = '' + $stubVM.State = 'Running' + $stubVM.IsClustered = $true $stubVM.NetworkAdapters = @( $stubNIC1, $stubNIC2 @@ -360,6 +490,7 @@ try } Mock -CommandName Get-Module -ParameterFilter { ($Name -eq 'Hyper-V') -and ($ListAvailable -eq $true) } -MockWith { return $true } + Mock -CommandName Get-Module -ParameterFilter { ($Name -eq 'FailoverClusters') -and ($ListAvailable -eq $true) } -MockWith { return $true } Mock -CommandName Get-VhdHierarchy -ParameterFilter { $VhdPath.EndsWith('.vhd') } -MockWith { # Return single Vhd chain for .vhds return @($stubVhdDisk.Path) @@ -399,10 +530,19 @@ try $targetResource = Get-TargetResource -Name 'VMWithAutomaticCheckpoints' -VhdPath $stubVhdxDisk.Path $targetResource.ContainsKey('AutomaticCheckpointsEnabled') | Should -Be $true } + It 'Hash table contains key IsClustered' { + $targetResource = Get-TargetResource -Name 'ClusteredExistingVmInClusterPresent' -VhdPath $stubVhdxDisk.Path + $targetResource.ContainsKey('IsClustered') | Should -Be $true + } It 'throws when Hyper-V Tools are not installed' { # This test needs to be the last in the Context otherwise all subsequent Get-Module checks will fail Mock -CommandName Get-Module -ParameterFilter { ($Name -eq 'Hyper-V') -and ($ListAvailable -eq $true) } - { Get-TargetResource -Name 'RunningVM' @testParams } | Should -Throw + { Get-TargetResource -Name 'RunningVM' -VhdPath $stubVhdxDisk.Path } | Should -Throw + } + It 'throws when Clustering feature is not installed but VM should be clustered' { + # This test needs to be the last in the Context otherwise all subsequent Get-Module checks will fail + Mock -CommandName Get-Module -ParameterFilter { ($Name -eq 'FailoverClusters') -and ($ListAvailable -eq $true) } -MockWith { return $true } + { Get-TargetResource -Name 'ClusteredExistingVmInClusterPresent' -VhdPath $stubVhdxDisk.Path -IsClustered $true } | Should -Throw } } #end context Validates Get-TargetResource Method @@ -561,6 +701,18 @@ try Test-TargetResource -Name 'VMWithAutomaticCheckpoints' -AutomaticCheckpointsEnabled $false @testParams | Should -Be $false } + It 'Returns $true when IsClustered is enabled, Ensure is Present and VM is clustered' { + Test-TargetResource -Name ClusteredExistingVmInClusterPresent -IsClustered $true @testParams | Should -Be $true + } + + It 'Returns $false when IsClustered is enabled, Ensure is Present and VM is not clustered' { + Test-TargetResource -Name ClusteredExistingVmNotInClusterPresent -IsClustered $true @testParams | Should -Be $false + } + + It 'Returns $false when IsClustered is enabled, Ensure is Absent VM is present and VM is clustered' { + Test-TargetResource -Name ClusteredExistingVmInClusterAbsent -Ensure Absent -IsClustered $true @testParams | Should -Be $false + } + It 'Returns $true when EnableGuestService is on and requested "EnableGuestService" = "$true"' { Mock -CommandName Get-VMIntegrationService -MockWith { $guestServiceInterface = [Microsoft.HyperV.PowerShell.VMIntegrationComponent]::CreateTypeInstance() @@ -579,6 +731,12 @@ try { Test-TargetResource -Name 'RunningVM' @testParams } | Should -Throw } + It 'throws when Failover Clustering us not installed' { + # This test needs to be the last in the Context otherwise all subsequent Get-Module checks will fail + Mock -CommandName Get-Module -ParameterFilter { ($Name -eq 'FailoverClusters') -and ($ListAvailable -eq $true) } + { Test-TargetResource -Name 'RunningVM' -IsClustered $true @testParams} | Should -Throw + } + } #end context Validates Test-TargetResource Method Context 'Validates Set-TargetResource Method' { @@ -798,6 +956,30 @@ try Assert-MockCalled -CommandName Disable-VMIntegrationService -Exactly -Times 1 -Scope It } + Mock -CommandName Get-ClusterGroup -MockWith {@{ + Name = 'VM' + OwnerNode = 'HOST1' + State = 'Online' + }} + Mock -CommandName Remove-ClusterGroup + Mock -CommandName Add-ClusterVirtualMachineRole + + It 'Calls Get- and Remove-ClusterGroup if Ensure is Absent and VM exists' { + Set-TargetResource -Name 'ClusteredExistingVmInClusterAbsent' -IsClustered $true -Ensure Absent @testParams + Assert-MockCalled -CommandName Remove-ClusterGroup -Exactly -Times 1 -Scope It + Assert-MockCalled -CommandName Get-ClusterGroup -Exactly -Times 1 -Scope It + } + + It 'Calls Add-ClusterVirtualMachineRole if Ensure is Present and VM exists but is not clustered yet' { + Set-TargetResource -Name 'ClusteredExistingVmNotInClusterPresent' -IsClustered $true @testParams + Assert-MockCalled -CommandName Add-ClusterVirtualMachineRole -Exactly -Times 1 -Scope It + } + + It 'Calls Add-ClusterVirtualMachineRole if Ensure is Present and VM does not exist' { + Set-TargetResource -Name 'NonexistentVm' -IsClustered $true @testParams + Assert-MockCalled -CommandName Add-ClusterVirtualMachineRole -Exactly -Times 1 -Scope It + } + Mock -CommandName Get-Command -ParameterFilter { $Name -eq 'Set-VM' -and $Module -eq 'Hyper-V' } -MockWith { [pscustomobject]@{ parameters = @{ @@ -901,6 +1083,11 @@ try Mock -CommandName Get-Module -ParameterFilter { ($Name -eq 'Hyper-V') -and ($ListAvailable -eq $true) } { Set-TargetResource -Name 'RunningVM' @testParams } | Should -Throw } + + It 'Does not call "Set-VM" when "AutomaticCheckpointsEnabled" is unsupported and unspecified' { + Set-TargetResource -Name 'VMAutomaticCheckpointsUnsupported' @testParams + Assert-MockCalled -CommandName Set-VM -Exactly -Times 0 -Scope It + } } #end context Validates Set-TargetResource Method Context 'Validates Test-VMSecureBoot Method' { @@ -955,7 +1142,7 @@ try } } #end context validates Get-VhdHierarchy - } #end describe xVMHyper-V + } #end describe VMHyperV } #end inmodulescope } finally diff --git a/tests/Unit/Stubs/FailoverClusters.psm1 b/tests/Unit/Stubs/FailoverClusters.psm1 new file mode 100644 index 0000000..2f3a68c --- /dev/null +++ b/tests/Unit/Stubs/FailoverClusters.psm1 @@ -0,0 +1,7474 @@ +# Name: FailoverClusters +# Version: 2.0.0.0 +# CreatedOn: 2023-04-17 14:27:35Z + +Add-Type -IgnoreWarnings -TypeDefinition @' +namespace Microsoft.FailoverClusters.NativeHelp +{ + public class NativeGroupHelp + { + // Constructor + public NativeGroupHelp() { } + + } + + + public enum VmMigrationType : int + { + TurnOff = 0, + Quick = 1, + Shutdown = 2, + ShutdownForce = 3, + Live = 4, + } +} + +namespace Microsoft.FailoverClusters.PowerShell +{ + public enum AdminAccessPoint : int + { + None = 0, + ActiveDirectoryAndDns = 1, + Dns = 2, + ActiveDirectory = 3, + } + + public enum AdminAccessPointResType : int + { + Automatic = 0, + Singleton = 1, + Distributed = 2, + } + + public class Cluster + { + // Property + public System.UInt32 AddEvictDelay { get; set; } + public Microsoft.FailoverClusters.PowerShell.AdminAccessPoint AdministrativeAccessPoint { get; set; } + public System.UInt32 AutoAssignNodeSite { get; set; } + public System.UInt32 AutoBalancerMode { get; set; } + public System.UInt32 AutoBalancerLevel { get; set; } + public System.UInt32 BackupInProgress { get; set; } + public System.UInt32 BlockCacheSize { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterCloudType DetectedCloudPlatform { get; set; } + public System.UInt32 DetectManagedEvents { get; set; } + public System.UInt32 DetectManagedEventsThreshold { get; set; } + public System.UInt32 ClusSvcHangTimeout { get; set; } + public System.UInt32 ClusSvcRegroupStageTimeout { get; set; } + public System.UInt32 ClusSvcRegroupTickInMilliseconds { get; set; } + public System.UInt32 ClusterEnforcedAntiAffinity { get; set; } + public System.UInt32 ClusterFunctionalLevel { get; set; } + public System.UInt32 ClusterUpgradeVersion { get; set; } + public System.UInt32 ClusterGroupWaitDelay { get; set; } + public System.UInt32 ClusterLogLevel { get; set; } + public System.UInt32 ClusterLogSize { get; set; } + public System.UInt32 CrossSiteDelay { get; set; } + public System.UInt32 CrossSiteThreshold { get; set; } + public System.UInt32 CrossSubnetDelay { get; set; } + public System.UInt32 CrossSubnetThreshold { get; set; } + public System.UInt32 CsvBalancer { get; set; } + public System.UInt32 CsvTimeToWait { get; set; } + public System.UInt32 DatabaseReadWriteMode { get; set; } + public System.UInt32 DefaultNetworkRole { get; set; } + public System.String Description { get; set; } + public System.String Domain { get; set; } + public System.UInt32 DrainOnShutdown { get; set; } + public System.UInt64 DumpPolicy { get; set; } + public System.UInt32 DynamicQuorum { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumesSetting EnableSharedVolumes { get; set; } + public System.UInt32 FixQuorum { get; set; } + public System.UInt32 GroupDependencyTimeout { get; set; } + public System.UInt32 HangRecoveryAction { get; set; } + public System.String Id { get; set; } + public System.UInt32 IgnorePersistentStateOnStartup { get; set; } + public System.UInt32 LogResourceControls { get; set; } + public System.UInt32 LowerQuorumPriorityNodeId { get; set; } + public System.UInt32 MessageBufferLength { get; set; } + public System.UInt32 MinimumNeverPreemptPriority { get; set; } + public System.UInt32 MinimumPreemptorPriority { get; set; } + public System.String Name { get; set; } + public System.UInt32 NetftIPSecEnabled { get; set; } + public System.UInt32 PlacementOptions { get; set; } + public System.UInt32 PlumbAllCrossSubnetRoutes { get; set; } + public System.String PreferredSite { get; set; } + public System.UInt32 PreventQuorum { get; set; } + public System.UInt32 QuarantineDuration { get; set; } + public System.UInt32 QuarantineThreshold { get; set; } + public System.UInt32 QuorumArbitrationTimeMax { get; set; } + public System.DateTime RecentEventsResetTime { get; set; } + public System.UInt32 RequestReplyTimeout { get; set; } + public System.UInt32 ResiliencyDefaultPeriod { get; set; } + public System.Nullable ResiliencyLevel { get; set; } + public System.UInt32 RouteHistoryLength { get; set; } + public System.UInt32 S2DBusTypes { get; set; } + public Microsoft.FailoverClusters.PowerShell.S2DCacheBehavior S2DCacheBehavior { get; set; } + public Microsoft.FailoverClusters.PowerShell.S2DCacheState S2DCacheDesiredState { get; set; } + public System.UInt64 S2DCacheMetadataReserveBytes { get; set; } + public System.UInt32 S2DCachePageSizeKBytes { get; set; } + public System.UInt32 S2DEnabled { get; set; } + public System.UInt32 S2DIOLatencyThreshold { get; set; } + public System.UInt32 S2DOptimizations { get; set; } + public System.UInt32 WprSessionCount { get; set; } + public System.UInt32 WprSessionCoolOffTime { get; set; } + public System.UInt32 RolloutAudience { get; set; } + public System.UInt32 DpcWatchdogProfileSingleDpcThreshold { get; set; } + public System.UInt32 DpcWatchdogProfileCumulativeDpcThreshold { get; set; } + public System.Object GlobalWprSessionConfig { get; set; } + public System.UInt32 SameSubnetDelay { get; set; } + public System.UInt32 SameSubnetThreshold { get; set; } + public System.UInt32 SecurityLevel { get; set; } + public System.UInt32 SecurityLevelForStorage { get; set; } + public System.UInt32 SetSMBBandwidthLimit { get; set; } + public System.UInt32 SMBBandwidthLimitFactor { get; set; } + public System.Object SharedVolumeCompatibleFilters { get; set; } + public System.Object SharedVolumeIncompatibleFilters { get; set; } + public System.Byte[] SharedVolumeSecurityDescriptor { get; set; } + public System.String SharedVolumesRoot { get; set; } + public System.UInt32 SharedVolumeVssWriterOperationTimeout { get; set; } + public System.UInt32 ShutdownTimeoutInMinutes { get; set; } + public System.UInt32 UseClientAccessNetworksForSharedVolumes { get; set; } + public System.UInt32 WitnessDatabaseWriteTimeout { get; set; } + public System.UInt32 WitnessDynamicWeight { get; set; } + public System.UInt32 WitnessRestartInterval { get; set; } + public System.Object EnabledEventLogs { get; set; } + public System.UInt32 UseRdmaForStorage { get; set; } + + // Fabricated constructor + private Cluster() { } + public static Cluster CreateTypeInstance() + { + return new Cluster(); + } + } + + public class ClusterAccessRule + { + // Constructor + public ClusterAccessRule(Microsoft.FailoverClusters.PowerShell.Cluster cluster, MS.Internal.ServerClusters.ClusterAccessRule rule) { } + + // Property + public Microsoft.FailoverClusters.PowerShell.Cluster Cluster { get; set; } + public System.Security.AccessControl.AccessControlType AccessControlType { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterRights ClusterRights { get; set; } + public System.Security.Principal.IdentityReference IdentityReference { get; set; } + + // Fabricated constructor + private ClusterAccessRule() { } + public static ClusterAccessRule CreateTypeInstance() + { + return new ClusterAccessRule(); + } + } + + [System.Flags] + public enum ClusterApplicationStatusInformation : ulong + { + Locked = 1, + Preempted = 2, + Queued = 4, + PhysicalResourcesLacking = 8, + WaitingToStart = 16, + EmbeddedFailure = 32, + OfflineAntiAffinityConflict = 64, + NetworkFailure = 128, + Unmonitored = 256, + WaitingForDependencies = 4096, + } + + public enum ClusterCloudType : int + { + None = 0, + Azure = 1, + Mixed = 128, + Unknown = -1, + } + + public class ClusterCryptoCheckpoint + { + // Property + public Microsoft.FailoverClusters.PowerShell.ClusterResource Resource { get; set; } + public System.String Key { get; set; } + public System.String CryptoType { get; set; } + public System.String Name { get; set; } + + // Fabricated constructor + private ClusterCryptoCheckpoint() { } + public static ClusterCryptoCheckpoint CreateTypeInstance() + { + return new ClusterCryptoCheckpoint(); + } + } + + public class ClusterDiskInfo + { + // Property + public Microsoft.FailoverClusters.PowerShell.Cluster Cluster { get; set; } + public System.String Id { get; set; } + public System.String Name { get; set; } + public System.UInt32 Number { get; set; } + public System.UInt64 Size { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterDiskPartitionInfo[] Partitions { get; set; } + + // Fabricated constructor + private ClusterDiskInfo() { } + public static ClusterDiskInfo CreateTypeInstance() + { + return new ClusterDiskInfo(); + } + } + + public class ClusterDiskPartitionInfo + { + public bool IsSecondaryStubType = true; + + public ClusterDiskPartitionInfo() { } + } + + public class ClusterGroup + { + // Property + public System.Object AntiAffinityClassNames { get; set; } + public System.UInt32 AutoFailbackType { get; set; } + public System.UInt32 ColdStartSetting { get; set; } + public Microsoft.FailoverClusters.PowerShell.Cluster Cluster { get; set; } + public System.UInt32 DefaultOwner { get; set; } + public System.String Description { get; set; } + public Microsoft.FailoverClusters.PowerShell.GroupType GroupType { get; set; } + public System.UInt32 FailoverPeriod { get; set; } + public System.UInt32 FailoverThreshold { get; set; } + public System.UInt32 FailbackWindowEnd { get; set; } + public System.UInt32 FailbackWindowStart { get; set; } + public System.UInt32 FaultDomain { get; set; } + public System.Boolean IsCoreGroup { get; set; } + public System.UInt32 LockedFromMoving { get; set; } + public System.String Name { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNode OwnerNode { get; set; } + public System.UInt32 PersistentState { get; set; } + public System.UInt32 PlacementOptions { get; set; } + public System.Object PreferredSite { get; set; } + public System.UInt32 Priority { get; set; } + public System.UInt32 ResiliencyPeriod { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterGroupState State { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterApplicationStatusInformation StatusInformation { get; set; } + public System.UInt32 UpdateDomain { get; set; } + public System.String Id { get; set; } + + // Fabricated constructor + private ClusterGroup() { } + public static ClusterGroup CreateTypeInstance() + { + return new ClusterGroup(); + } + } + + public enum ClusterGroupState : int + { + Online = 0, + Offline = 1, + Failed = 2, + PartialOnline = 3, + Pending = 4, + Unknown = -1, + } + + public class ClusterNetwork + { + // Property + public System.String Address { get; set; } + public System.String AddressMask { get; set; } + public System.Boolean AutoMetric { get; set; } + public Microsoft.FailoverClusters.PowerShell.Cluster Cluster { get; set; } + public System.String Description { get; set; } + public System.String Id { get; set; } + public System.Object Ipv4Addresses { get; set; } + public System.Object Ipv4PrefixLengths { get; set; } + public System.Object Ipv6Addresses { get; set; } + public System.Object Ipv6PrefixLengths { get; set; } + public System.UInt32 Metric { get; set; } + public System.String Name { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNetworkRole Role { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNetworkState State { get; set; } + + // Fabricated constructor + private ClusterNetwork() { } + public static ClusterNetwork CreateTypeInstance() + { + return new ClusterNetwork(); + } + } + + public class ClusterNetworkInterface + { + // Property + public System.String Adapter { get; set; } + public System.String AdapterId { get; set; } + public System.String Address { get; set; } + public Microsoft.FailoverClusters.PowerShell.Cluster Cluster { get; set; } + public System.String Description { get; set; } + public System.UInt32 DhcpEnabled { get; set; } + public System.String Id { get; set; } + public System.Object Ipv4Addresses { get; set; } + public System.Object Ipv6Addresses { get; set; } + public System.String Name { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNetwork Network { get; set; } + public System.String Node { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNetworkInterfaceState State { get; set; } + + // Fabricated constructor + private ClusterNetworkInterface() { } + public static ClusterNetworkInterface CreateTypeInstance() + { + return new ClusterNetworkInterface(); + } + } + + public enum ClusterNetworkInterfaceState : int + { + Unavailable = 0, + Failed = 1, + Unreachable = 2, + Up = 3, + Unknown = -1, + } + + public enum ClusterNetworkRole : int + { + None = 0, + Cluster = 1, + Client = 2, + ClusterAndClient = 3, + } + + public enum ClusterNetworkState : int + { + Unavailable = 0, + Down = 1, + Partitioned = 2, + Up = 3, + Unknown = -1, + } + + public class ClusterNode + { + // Property + public System.UInt32 BuildNumber { get; set; } + public Microsoft.FailoverClusters.PowerShell.Cluster Cluster { get; set; } + public System.String CSDVersion { get; set; } + public System.String Description { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNodeDrainStatus DrainStatus { get; set; } + public System.UInt32 DrainTarget { get; set; } + public System.UInt32 DynamicWeight { get; set; } + public System.String Id { get; set; } + public System.UInt32 MajorVersion { get; set; } + public System.UInt32 MinorVersion { get; set; } + public System.String Name { get; set; } + public System.UInt32 NeedsPreventQuorum { get; set; } + public System.UInt32 NodeHighestVersion { get; set; } + public System.String NodeInstanceID { get; set; } + public System.UInt32 NodeLowestVersion { get; set; } + public System.String NodeName { get; set; } + public System.UInt32 NodeWeight { get; set; } + public System.Object FaultDomain { get; set; } + public System.String Model { get; set; } + public System.String Manufacturer { get; set; } + public System.String SerialNumber { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNodeState State { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNodeStatusInformation StatusInformation { get; set; } + public Microsoft.FailoverClusters.PowerShell.NodeType Type { get; set; } + public System.String UniqueID { get; set; } + public Microsoft.FailoverClusters.PowerShell.NodeCloudType DetectedCloudPlatform { get; set; } + + // Fabricated constructor + private ClusterNode() { } + public static ClusterNode CreateTypeInstance() + { + return new ClusterNode(); + } + } + + public enum ClusterNodeDrainStatus : int + { + NotInitiated = 0, + InProgress = 1, + Completed = 2, + Failed = 3, + } + + public enum ClusterNodeState : int + { + Up = 0, + Down = 1, + Paused = 2, + Joining = 3, + Unknown = -1, + } + + [System.Flags] + public enum ClusterNodeStatusInformation : int + { + Normal = 0, + Isolated = 1, + Quarantined = 2, + DrainInProgress = 4, + DrainCompleted = 8, + DrainFailed = 16, + AvoidPlacement = 32, + Unknown = -2147483648, + } + + public class ClusterObject + { + public bool IsSecondaryStubType = true; + + public ClusterObject() { } + } + + public class ClusterOwnerNodeList + { + // Property + public Microsoft.FailoverClusters.PowerShell.ClusterObject ClusterObject { get; set; } + public System.Collections.Generic.ICollection OwnerNodes { get; set; } + + // Fabricated constructor + private ClusterOwnerNodeList() { } + public static ClusterOwnerNodeList CreateTypeInstance() + { + return new ClusterOwnerNodeList(); + } + } + + public class ClusterParameter + { + // Constructor + public ClusterParameter(Microsoft.FailoverClusters.PowerShell.ClusterObject clusterObject, System.String name, System.Object value) { } + public ClusterParameter(Microsoft.FailoverClusters.PowerShell.ClusterObject clusterObject, System.String name, System.Object value, Microsoft.FailoverClusters.PowerShell.ClusterParameterType type) { } + public ClusterParameter(Microsoft.FailoverClusters.PowerShell.ClusterObject clusterObject, System.String name, System.Object value, System.Boolean isReadOnly, Microsoft.FailoverClusters.PowerShell.ClusterParameterType type) { } + + // Property + public Microsoft.FailoverClusters.PowerShell.ClusterObject ClusterObject { get; set; } + public System.String Name { get; set; } + public System.Boolean IsReadOnly { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterParameterType ParameterType { get; set; } + public System.Object Value { get; set; } + + // Fabricated constructor + private ClusterParameter() { } + public static ClusterParameter CreateTypeInstance() + { + return new ClusterParameter(); + } + } + + public enum ClusterParameterType : int + { + Unknown = 0, + ByteArray = 1, + UInt32 = 2, + String = 3, + ExpandString = 4, + StringCollection = 5, + UInt64 = 6, + Int32 = 7, + ExpandedString = 8, + Int64 = 10, + UInt16 = 11, + DateTime = 12, + } + + public class ClusterQuorumSettings + { + // Property + public Microsoft.FailoverClusters.PowerShell.Cluster Cluster { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterResource QuorumResource { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterQuorumType QuorumType { get; set; } + + // Fabricated constructor + private ClusterQuorumSettings() { } + public static ClusterQuorumSettings CreateTypeInstance() + { + return new ClusterQuorumSettings(); + } + } + + public enum ClusterQuorumType : int + { + Unknown = 0, + Majority = 1, + DiskOnly = 2, + } + + public class ClusterRegistryCheckpoint + { + // Property + public Microsoft.FailoverClusters.PowerShell.ClusterResource Resource { get; set; } + public System.String Name { get; set; } + + // Fabricated constructor + private ClusterRegistryCheckpoint() { } + public static ClusterRegistryCheckpoint CreateTypeInstance() + { + return new ClusterRegistryCheckpoint(); + } + } + + public enum ClusterResiliencyLevel : int + { + IsolateOnSpecialHeartbeat = 1, + AlwaysIsolate = 2, + } + + public class ClusterResource + { + // Property + public Microsoft.FailoverClusters.PowerShell.ClusterResourceAndResourceTypeCharacteristics Characteristics { get; set; } + public Microsoft.FailoverClusters.PowerShell.Cluster Cluster { get; set; } + public System.UInt32 DeadlockTimeout { get; set; } + public System.String Description { get; set; } + public System.String Id { get; set; } + public System.Boolean IsCoreResource { get; set; } + public System.UInt32 EmbeddedFailureAction { get; set; } + public System.UInt32 IsAlivePollInterval { get; set; } + public System.Boolean IsNetworkClassResource { get; set; } + public System.Boolean IsStorageClassResource { get; set; } + public System.UInt64 LastOperationStatusCode { get; set; } + public System.UInt32 LooksAlivePollInterval { get; set; } + public System.Boolean MaintenanceMode { get; set; } + public System.UInt32 MonitorProcessId { get; set; } + public System.String Name { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterGroup OwnerGroup { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNode OwnerNode { get; set; } + public System.UInt32 PendingTimeout { get; set; } + public System.UInt32 PersistentState { get; set; } + public System.UInt64 ResourceSpecificData1 { get; set; } + public System.UInt64 ResourceSpecificData2 { get; set; } + public System.String ResourceSpecificStatus { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterResourceType ResourceType { get; set; } + public System.UInt32 RestartAction { get; set; } + public System.UInt32 RestartDelay { get; set; } + public System.UInt32 RestartPeriod { get; set; } + public System.UInt32 RestartThreshold { get; set; } + public System.UInt32 RetryPeriodOnFailure { get; set; } + public System.Boolean SeparateMonitor { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterResourceState State { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterResourceStatusInformation StatusInformation { get; set; } + + // Fabricated constructor + private ClusterResource() { } + public static ClusterResource CreateTypeInstance() + { + return new ClusterResource(); + } + } + + [System.Flags] + public enum ClusterResourceAndResourceTypeCharacteristics : int + { + Quorum = 1, + DeleteRequiresAllNodes = 2, + LocalQuorum = 4, + LocalQuorumDebug = 8, + RequiresStateChangeReason = 16, + BroadcastDelete = 32, + SingleClusterInstance = 64, + SingleGroupInstance = 128, + SharedVolumeCompatible = 256, + PlacementAware = 512, + MonitorDetach = 1024, + MonitorReattach = 2048, + OperationContext = 4096, + Clones = 8192, + NotPreemptable = 16384, + NotifyNewOwner = 32768, + SupportsUnmonitoredState = 65536, + Infrastructure = 131072, + CheckDrainVeto = 262144, + } + + public class ClusterResourceDependency + { + // Property + public Microsoft.FailoverClusters.PowerShell.ClusterResource Resource { get; set; } + public System.String DependencyExpression { get; set; } + + // Fabricated constructor + private ClusterResourceDependency() { } + public static ClusterResourceDependency CreateTypeInstance() + { + return new ClusterResourceDependency(); + } + } + + public enum ClusterResourceState : int + { + Inherited = 0, + Initializing = 1, + Online = 2, + Offline = 3, + Failed = 4, + Pending = 128, + OnlinePending = 129, + OfflinePending = 130, + Unknown = -1, + } + + [System.Flags] + public enum ClusterResourceStatusInformation : ulong + { + Locked = 1, + EmbeddedFailure = 2, + InsufficientCpu = 4, + InsufficientMemory = 8, + InsufficientResources = 16, + NetworkFailure = 32, + Unmonitored = 64, + } + + public class ClusterResourceType + { + // Property + public System.Object AdminExtensions { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterResourceAndResourceTypeCharacteristics Characteristics { get; set; } + public Microsoft.FailoverClusters.PowerShell.Cluster Cluster { get; set; } + public System.UInt32 DeadlockTimeout { get; set; } + public System.String Description { get; set; } + public System.String DisplayName { get; set; } + public System.String DllName { get; set; } + public System.Object DumpLogQuery { get; set; } + public System.UInt64 DumpPolicy { get; set; } + public System.Object DumpServices { get; set; } + public System.Object EnabledEventLogs { get; set; } + public System.UInt64 WprStartAfter { get; set; } + public System.Object WprProfiles { get; set; } + public System.String Id { get; set; } + public System.UInt32 IsAlivePollInterval { get; set; } + public System.UInt32 LooksAlivePollInterval { get; set; } + public System.UInt32 MaximumMonitors { get; set; } + public System.String Name { get; set; } + public System.UInt32 PendingTimeout { get; set; } + + // Fabricated constructor + private ClusterResourceType() { } + public static ClusterResourceType CreateTypeInstance() + { + return new ClusterResourceType(); + } + } + + public enum ClusterRights : int + { + None = 0, + Read = 1, + Full = 2, + } + + public class ClusterSharedVolume + { + // Property + public System.String Id { get; set; } + public System.String Name { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterNode OwnerNode { get; set; } + public System.Collections.Generic.ICollection SharedVolumeInfo { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterResourceState State { get; set; } + + // Fabricated constructor + private ClusterSharedVolume() { } + public static ClusterSharedVolume CreateTypeInstance() + { + return new ClusterSharedVolume(); + } + } + + [System.Flags] + public enum ClusterSharedVolumeBlockRedirectedIOReason : int + { + NotBlockRedirected = 0, + NoDiskConnectivity = 1, + StorageSpaceNotAttached = 2, + VolumeReplicationEnabled = 4, + } + + [System.Flags] + public enum ClusterSharedVolumeFileSystemRedirectedIOReasons : int + { + NotFileSystemRedirected = 0, + UserRequest = 1, + IncompatibleFileSystemFilter = 2, + IncompatibleVolumeFilter = 4, + FileSystemTiering = 8, + BitLockerInitializing = 16, + FileSystemReFs = 32, + } + + public class ClusterSharedVolumeInfo + { + public bool IsSecondaryStubType = true; + + public ClusterSharedVolumeInfo() { } + } + + public enum ClusterSharedVolumesSetting : int + { + Disabled = 0, + Enabled = 1, + } + + public enum ClusterSharedVolumeState : int + { + Unavailable = 0, + Paused = 1, + Direct = 2, + FileSystemRedirected = 3, + BlockRedirected = 4, + } + + public class ClusterSharedVolumeStateInfo + { + // Constructor + public ClusterSharedVolumeStateInfo() { } + + // Property + public Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumeBlockRedirectedIOReason BlockRedirectedIOReason { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumeFileSystemRedirectedIOReasons FileSystemRedirectedIOReason { get; set; } + public System.String Name { get; set; } + public System.String Node { get; set; } + public Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumeState StateInfo { get; set; } + public System.String VolumeFriendlyName { get; set; } + public System.String VolumeName { get; set; } + + } + + public class ClusterTestInfo + { + // Property + public System.String Category { get; set; } + public System.String DisplayName { get; set; } + public System.String Description { get; set; } + + // Fabricated constructor + private ClusterTestInfo() { } + public static ClusterTestInfo CreateTypeInstance() + { + return new ClusterTestInfo(); + } + } + + public class ClusterVMMonitoredItem + { + // Property + public System.String VMName { get; set; } + public System.String Name { get; set; } + + // Fabricated constructor + private ClusterVMMonitoredItem() { } + public static ClusterVMMonitoredItem CreateTypeInstance() + { + return new ClusterVMMonitoredItem(); + } + } + + public enum GroupType : uint + { + Cluster = 1, + AvailableStorage = 2, + Temporary = 3, + ClusterSharedVolume = 4, + ClusterStoragePool = 5, + FileServer = 100, + DhcpServer = 102, + Dtc = 103, + Msmq = 104, + Wins = 105, + StandAloneDfs = 106, + GenericApplication = 107, + GenericService = 108, + GenericScript = 109, + IScsiNameService = 110, + VirtualMachine = 111, + TsSessionBroker = 112, + IScsiTarget = 113, + ScaleoutFileServer = 114, + VMReplicaBroker = 115, + TaskScheduler = 116, + InfrastructureFileServer = 122, + Unknown = 9999, + } + + public enum NodeCloudType : int + { + None = 0, + Azure = 1, + Unknown = -1, + } + + public enum NodeType : int + { + Node = 0, + StorageNode = 1, + } + + public enum ResumeClusterNodeFailbackType : int + { + NoFailback = 0, + Immediate = 1, + Policy = 2, + } + + [System.Flags] + public enum S2DCacheBehavior : ulong + { + Dormant = 1, + SkipSpindlePartitionsRemovalOnDisable = 2, + SkipFlashPartitionsRemovalOnDisable = 4, + CacheModeHddRead = 8, + CacheModeHddWrite = 16, + CacheModeSsdread = 32, + CacheModeSsdWrite = 64, + Default = 88, + UseScmForCapacity = 128, + } + + public enum S2DCacheState : int + { + Disabled = 0, + Enabled = 2, + ReadOnly = 4, + ReadWrite = 12, + Provisioning = 14, + ProvisioningFlash = 15, + ProvisioningSpinningMedia = 20, + Disabling = 120, + Dormant = 200, + IneligibleNoDisks = 1001, + IneligibleNoFlash = 1002, + IneligibleNotMixedMedia = 1003, + } + +} + +namespace Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_AffinityRule +{ + public enum RuleType : uint + { + SameFaultDomain = 1, + SameNode = 2, + DifferentFaultDomain = 3, + DifferentNode = 4, + } + +} + +namespace Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_FaultDomain +{ + public enum FaultDomainType : uint + { + Unknown = 0, + Site = 1000, + Rack = 2000, + Chassis = 3000, + Node = 4000, + StorageNode = 5000, + } + +} + +namespace Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_GroupSet +{ + public enum StartupSettingType : uint + { + Delay = 1, + Online = 2, + } + +} + +namespace Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect +{ + public enum CacheModeType : uint + { + ReadOnly = 4, + WriteOnly = 8, + ReadWrite = 12, + } + + public enum CacheStateType : uint + { + Disabled = 0, + Enabled = 2, + } + + public enum S2DBusType : ushort + { + Sas = 10, + Sata = 11, + Nvme = 17, + SCM = 18, + } + + public enum ScmUse : uint + { + Cache = 0, + Capacity = 1, + } + + public enum SedProtectionStateType : uint + { + Disabled = 0, + Provisioned = 1, + Protected = 2, + } + +} + +namespace MS.Internal.ServerClusters +{ + public class ClusterAccessRule + { + public bool IsSecondaryStubType = true; + + public ClusterAccessRule() { } + } + +} + +namespace SetClusterStorageSpacesDirectDisk +{ + [System.Flags] + public enum S2DDiskUsage : int + { + NonHybrid = 0, + Capacity = 1, + Cache = 2, + Auto = 3, + } + +} + +'@ + +function Add-VMToCluster { + <# + .SYNOPSIS + Add-ClusterVirtualMachineRole [[-VMName] ] [-Name ] [-VirtualMachine ] [-VMId ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216198')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(Position=0, ValueFromPipelineByPropertyName=$true)] + [string] + ${VMName}, + + [Alias('VM')] + [string] + ${VirtualMachine}, + + [Parameter(ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Disable-ClusterS2D { + <# + .SYNOPSIS + Disable-ClusterStorageSpacesDirect [-CleanupCache ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false, HelpUri='https://go.microsoft.com/fwlink/?LinkId=615933')] + param ( + [Parameter(ParameterSetName='DefaultParameterSet')] + [bool] + ${CleanupCache}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Enable-ClusterS2D { + <# + .SYNOPSIS + Enable-ClusterStorageSpacesDirect [-PoolFriendlyName ] [-Autoconfig ] [-CacheState ] [-CacheMetadataReserveBytes ] [-CachePageSizeKBytes ] [-SkipEligibilityChecks] [-CollectPerformanceHistory ] [-BusTypesToUse ] [-SedProtectionState ] [-UseSedExclusively ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + +Enable-ClusterStorageSpacesDirect -XML [-PoolFriendlyName ] [-Autoconfig ] [-CacheState ] [-CacheMetadataReserveBytes ] [-CachePageSizeKBytes ] [-SkipEligibilityChecks] [-CollectPerformanceHistory ] [-BusTypesToUse ] [-SedProtectionState ] [-UseSedExclusively ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + +Enable-ClusterStorageSpacesDirect -CacheDeviceModel [-PoolFriendlyName ] [-Autoconfig ] [-CacheState ] [-CacheMetadataReserveBytes ] [-CachePageSizeKBytes ] [-SkipEligibilityChecks] [-CollectPerformanceHistory ] [-BusTypesToUse ] [-SedProtectionState ] [-UseSedExclusively ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false, HelpUri='https://go.microsoft.com/fwlink/?LinkId=615932')] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_StorageSpacesDirectEnable')] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_StorageSpacesDirectEnable')] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_StorageSpacesDirectEnable')] + param ( + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [ValidateNotNullOrEmpty()] + [string] + ${PoolFriendlyName}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [bool] + ${Autoconfig}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.CacheStateType] + ${CacheState}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [uint64] + ${CacheMetadataReserveBytes}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [ValidateSet('8','16','32','64')] + [uint32] + ${CachePageSizeKBytes}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [switch] + ${SkipEligibilityChecks}, + + [Parameter(ParameterSetName='WithCacheDeviceModel', Mandatory=$true)] + [string[]] + ${CacheDeviceModel}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [bool] + ${CollectPerformanceHistory}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.S2DBusType[]] + ${BusTypesToUse}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.SedProtectionStateType] + ${SedProtectionState}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [bool] + ${UseSedExclusively}, + + [Parameter(ParameterSetName='WithXML', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${XML}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterPerf { + <# + .SYNOPSIS + Get-ClusterPerformanceHistory [[-ClusterSeriesName] ] [[-TimeFrame] ] [[-Cluster] ] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory -SeriesKeyName -Stream [-UsePattern] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-ClusterNodeSeriesName] ] [[-TimeFrame] ] [-ClusterNode] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-VMSeriesName] ] [[-TimeFrame] ] [-VM] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-VHDSeriesName] ] [[-TimeFrame] ] [-VHD] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-PhysicalDiskSeriesName] ] [[-TimeFrame] ] [-PhysicalDisk] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-VolumeSeriesName] ] [[-TimeFrame] ] [-Volume] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-NetAdapterSeriesName] ] [[-TimeFrame] ] [-NetworkAdapter] [-CimSession ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='ByCluster', SupportsShouldProcess=$true, ConfirmImpact='Medium')] + param ( + [Parameter(ParameterSetName='Api', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${SeriesKeyName}, + + [Parameter(ParameterSetName='Api', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${Stream}, + + [Parameter(ParameterSetName='Api')] + [switch] + ${UsePattern}, + + [Parameter(ParameterSetName='ByCluster', Position=0)] + [System.Object] + ${ClusterSeriesName}, + + [Parameter(ParameterSetName='ByClusterNode', Position=0)] + [System.Object] + ${ClusterNodeSeriesName}, + + [Parameter(ParameterSetName='ByVM', Position=0)] + [System.Object] + ${VMSeriesName}, + + [Parameter(ParameterSetName='ByVHD', Position=0)] + [System.Object] + ${VHDSeriesName}, + + [Parameter(ParameterSetName='ByPhysicalDisk', Position=0)] + [System.Object] + ${PhysicalDiskSeriesName}, + + [Parameter(ParameterSetName='ByVolume', Position=0)] + [System.Object] + ${VolumeSeriesName}, + + [Parameter(ParameterSetName='ByNetAdapter', Position=0)] + [System.Object] + ${NetAdapterSeriesName}, + + [Parameter(ParameterSetName='ByNetAdapter', Position=1)] + [Parameter(ParameterSetName='ByVolume', Position=1)] + [Parameter(ParameterSetName='ByPhysicalDisk', Position=1)] + [Parameter(ParameterSetName='ByVHD', Position=1)] + [Parameter(ParameterSetName='ByVM', Position=1)] + [Parameter(ParameterSetName='ByClusterNode', Position=1)] + [Parameter(ParameterSetName='ByCluster', Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateSet('MostRecent','LastHour','LastDay','LastWeek','LastMonth','LastYear')] + [string] + ${TimeFrame}, + + [Parameter(ParameterSetName='ByCluster', Position=2, ValueFromPipeline=$true)] + [Microsoft.FailoverClusters.PowerShell.Cluster] + ${Cluster}, + + [Parameter(ParameterSetName='ByClusterNode', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [Microsoft.FailoverClusters.PowerShell.ClusterNode[]] + ${ClusterNode}, + + [Parameter(ParameterSetName='ByVM', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.HyperV.PowerShell.VirtualMachine')] + [psobject[]] + ${VM}, + + [Parameter(ParameterSetName='ByVHD', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.Vhd.PowerShell.VirtualHardDisk')] + [psobject[]] + ${VHD}, + + [Parameter(ParameterSetName='ByPhysicalDisk', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#root/microsoft/windows/storage/MSFT_PhysicalDisk')] + [ciminstance[]] + ${PhysicalDisk}, + + [Parameter(ParameterSetName='ByVolume', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#root/microsoft/windows/storage/MSFT_Volume')] + [ciminstance[]] + ${Volume}, + + [Parameter(ParameterSetName='ByNetAdapter', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_NetAdapter')] + [ciminstance[]] + ${NetworkAdapter}, + + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterS2D { + <# + .SYNOPSIS + Get-ClusterStorageSpacesDirect [-Node ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false, HelpUri='https://go.microsoft.com/fwlink/?LinkId=691107')] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_StorageSpacesDirect')] + param ( + [Parameter(ParameterSetName='DefaultParameterSet')] + [string] + ${Node}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-VMFromCluster { + <# + .SYNOPSIS + Remove-ClusterGroup [[-Name] ] [-VMId ] [-Force] [-RemoveResources] [-Reason ] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216234')] + param ( + [Parameter(ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [switch] + ${Force}, + + [switch] + ${RemoveResources}, + + [string] + ${Reason}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Repair-ClusterS2D { + <# + .SYNOPSIS + Repair-ClusterStorageSpacesDirect [-DisableStorageMaintenanceMode] [-RecoverUnboundDrives] [-Node ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + +Repair-ClusterStorageSpacesDirect [-DisableStorageMaintenanceMode] [-Node ] [-SkipDiskRecovery] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='DefaultParameterSet', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] + param ( + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${DisableStorageMaintenanceMode}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${RecoverUnboundDrives}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [string] + ${Node}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [switch] + ${SkipDiskRecovery}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterS2D { + <# + .SYNOPSIS + Set-ClusterStorageSpacesDirect [-CacheState ] [-CacheModeHDD ] [-CacheModeSSD ] [-Nodes ] [-ScmUse ] [-SkipEligibilityChecks] [-SedProtectionState ] [-UseSedExclusively ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false, HelpUri='https://go.microsoft.com/fwlink/?LinkId=691106')] + param ( + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.CacheStateType] + ${CacheState}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.CacheModeType] + ${CacheModeHDD}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.CacheModeType] + ${CacheModeSSD}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [string[]] + ${Nodes}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.ScmUse] + ${ScmUse}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [switch] + ${SkipEligibilityChecks}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.SedProtectionStateType] + ${SedProtectionState}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [bool] + ${UseSedExclusively}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterS2DDisk { + <# + .SYNOPSIS + Set-ClusterStorageSpacesDirectDisk -PhysicalDiskGuid [-CanBeClaimed ] [-Reset] [-CacheUsage ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + +Set-ClusterStorageSpacesDirectDisk -PhysicalDisk [-CanBeClaimed ] [-Reset] [-CacheUsage ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='ByPhysicalDiskGuid', SupportsShouldProcess=$true, ConfirmImpact='High')] + param ( + [Parameter(ParameterSetName='ByPhysicalDiskGuid', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string[]] + ${PhysicalDiskGuid}, + + [Parameter(ParameterSetName='ByPhysicalDisk', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNullOrEmpty()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisk')] + [ciminstance[]] + ${PhysicalDisk}, + + [Parameter(ParameterSetName='ByPhysicalDisk')] + [Parameter(ParameterSetName='ByPhysicalDiskGuid')] + [bool] + ${CanBeClaimed}, + + [Parameter(ParameterSetName='ByPhysicalDisk')] + [Parameter(ParameterSetName='ByPhysicalDiskGuid')] + [switch] + ${Reset}, + + [Parameter(ParameterSetName='ByPhysicalDisk')] + [Parameter(ParameterSetName='ByPhysicalDiskGuid')] + [hasthable] + ${CacheUsage}, + + [CimSession] + ${CimSession}, + + [int] + ${ThrottleLimit}, + + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Start-ClusterPerf { + <# + .SYNOPSIS + Start-ClusterPerformanceHistory [[-CimSession] ] [] + #> + + [CmdletBinding()] + param ( + [Parameter(Position=0)] + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Stop-ClusterPerf { + <# + .SYNOPSIS + Stop-ClusterPerformanceHistory [[-CimSession] ] [-DeleteHistory] [] + #> + + [CmdletBinding()] + param ( + [switch] + ${DeleteHistory}, + + [Parameter(Position=0)] + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterGroupSetDependency { + <# + .SYNOPSIS + Add-ClusterGroupSetDependency [[-Name] ] [-Provider] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Add-ClusterGroupSetDependency [-Provider] -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_GroupSet')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, Position=1)] + [Parameter(ParameterSetName='Query (cdxml)', Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Provider}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterGroupToAffinityRule { + <# + .SYNOPSIS + Add-ClusterGroupToAffinityRule [[-Name] ] [-Groups] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Add-ClusterGroupToAffinityRule [-Groups] -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_AffinityRule')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_AffinityRule')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, Position=1)] + [Parameter(ParameterSetName='Query (cdxml)', Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string[]] + ${Groups}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterGroupToSet { + <# + .SYNOPSIS + Add-ClusterGroupToSet [[-Name] ] [-Group] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Add-ClusterGroupToSet [-Group] -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_GroupSet')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, Position=1)] + [Parameter(ParameterSetName='Query (cdxml)', Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Group}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterScaleoutZone { + <# + .SYNOPSIS + Add-ClusterScaleoutZone -VolumeName -ZoneId -ZoneSize [-GroupId ] [-TargetPath ] [-WhatIf] [-Confirm] [] + +Add-ClusterScaleoutZone -Vol -ZoneId -ZoneSize [-GroupId ] [-TargetPath ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High')] + param ( + [Parameter(ParameterSetName='WithVolId', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume GUID')] + [string] + ${VolumeName}, + + [Parameter(ParameterSetName='WithVolObj', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume Object')] + [System.Object] + ${Vol}, + + [Parameter(Mandatory=$true, HelpMessage='Supply a valid data zone GUID')] + [string] + ${ZoneId}, + + [Parameter(HelpMessage='Supply a group ID')] + [string] + ${GroupId}, + + [Parameter(Mandatory=$true, HelpMessage='The size of the zone to be added in bytes')] + [long] + ${ZoneSize}, + + [Parameter(HelpMessage='Supply a zone target path')] + [string] + ${TargetPath} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterSharedVolumeToAffinityRule { + <# + .SYNOPSIS + Add-ClusterSharedVolumeToAffinityRule [[-Name] ] [-ClusterSharedVolumes] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Add-ClusterSharedVolumeToAffinityRule [-ClusterSharedVolumes] -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_AffinityRule')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_AffinityRule')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, Position=1)] + [Parameter(ParameterSetName='Query (cdxml)', Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string[]] + ${ClusterSharedVolumes}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterStorageNode { + <# + .SYNOPSIS + Add-ClusterStorageNode -Name [-Description ] [-Location ] [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_StorageNode')] + param ( + [Parameter(ParameterSetName='AddStorageNode0', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Name}, + + [Parameter(ParameterSetName='AddStorageNode0')] + [string] + ${Description}, + + [Parameter(ParameterSetName='AddStorageNode0')] + [string] + ${Location}, + + [Parameter(ParameterSetName='AddStorageNode0')] + [uint32] + ${Flags}, + + [Parameter(ParameterSetName='AddStorageNode0')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='AddStorageNode0')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='AddStorageNode0')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Disable-ClusterScaleoutZone { + <# + .SYNOPSIS + Disable-ClusterScaleoutZone -VolumeName -ZoneId [-WhatIf] [-Confirm] [] + +Disable-ClusterScaleoutZone -Vol -ZoneId [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High')] + param ( + [Parameter(ParameterSetName='WithVolId', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume GUID')] + [string] + ${VolumeName}, + + [Parameter(ParameterSetName='WithVolObj', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume Object')] + [System.Object] + ${Vol}, + + [Parameter(Mandatory=$true, HelpMessage='Supply a valid existing data zone GUID')] + [string] + ${ZoneId} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Disable-ClusterStorageSpacesDirect { + <# + .SYNOPSIS + Disable-ClusterStorageSpacesDirect [-CleanupCache ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false, HelpUri='https://go.microsoft.com/fwlink/?LinkId=615933')] + param ( + [Parameter(ParameterSetName='DefaultParameterSet')] + [bool] + ${CleanupCache}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Enable-ClusterStorageSpacesDirect { + <# + .SYNOPSIS + Enable-ClusterStorageSpacesDirect [-PoolFriendlyName ] [-Autoconfig ] [-CacheState ] [-CacheMetadataReserveBytes ] [-CachePageSizeKBytes ] [-SkipEligibilityChecks] [-CollectPerformanceHistory ] [-BusTypesToUse ] [-SedProtectionState ] [-UseSedExclusively ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + +Enable-ClusterStorageSpacesDirect -XML [-PoolFriendlyName ] [-Autoconfig ] [-CacheState ] [-CacheMetadataReserveBytes ] [-CachePageSizeKBytes ] [-SkipEligibilityChecks] [-CollectPerformanceHistory ] [-BusTypesToUse ] [-SedProtectionState ] [-UseSedExclusively ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + +Enable-ClusterStorageSpacesDirect -CacheDeviceModel [-PoolFriendlyName ] [-Autoconfig ] [-CacheState ] [-CacheMetadataReserveBytes ] [-CachePageSizeKBytes ] [-SkipEligibilityChecks] [-CollectPerformanceHistory ] [-BusTypesToUse ] [-SedProtectionState ] [-UseSedExclusively ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false, HelpUri='https://go.microsoft.com/fwlink/?LinkId=615932')] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_StorageSpacesDirectEnable')] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_StorageSpacesDirectEnable')] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_StorageSpacesDirectEnable')] + param ( + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [ValidateNotNullOrEmpty()] + [string] + ${PoolFriendlyName}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [bool] + ${Autoconfig}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.CacheStateType] + ${CacheState}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [uint64] + ${CacheMetadataReserveBytes}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [ValidateSet('8','16','32','64')] + [uint32] + ${CachePageSizeKBytes}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [switch] + ${SkipEligibilityChecks}, + + [Parameter(ParameterSetName='WithCacheDeviceModel', Mandatory=$true)] + [string[]] + ${CacheDeviceModel}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [bool] + ${CollectPerformanceHistory}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.S2DBusType[]] + ${BusTypesToUse}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.SedProtectionStateType] + ${SedProtectionState}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [bool] + ${UseSedExclusively}, + + [Parameter(ParameterSetName='WithXML', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${XML}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='Auto')] + [Parameter(ParameterSetName='WithXML')] + [Parameter(ParameterSetName='WithCacheDeviceModel')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Export-HealthAgentConfig { + <# + .SYNOPSIS + Export-HealthAgentConfig [-Type] [-FilePath] [[-CimSession] ] [] + #> + + [CmdletBinding()] + param ( + [Parameter(Mandatory=$true, Position=0, HelpMessage='Valid values are: MAConfig, HADefinition')] + [ValidateSet('MAConfig','HADefinition')] + [string] + ${Type}, + + [Parameter(Mandatory=$true, Position=1, HelpMessage='Output file path for the configuration file')] + [string] + ${FilePath}, + + [Parameter(Position=2, HelpMessage='CimSession')] + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterAffinityRule { + <# + .SYNOPSIS + Get-ClusterAffinityRule [[-Name] ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_AffinityRule')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterDiagnosticInfo { + <# + .SYNOPSIS + Get-ClusterDiagnosticInfo [[-WriteToPath] ] [[-Cluster] ] [[-ZipPrefix] ] [-HoursOfEvents ] [-IncludeEvents] [] + +Get-ClusterDiagnosticInfo -ReadFromPath [] + #> + + [CmdletBinding()] + param ( + [Parameter(ParameterSetName='Write', Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${WriteToPath}, + + [Parameter(ParameterSetName='Write', Position=1)] + [ValidateNotNullOrEmpty()] + [string] + ${Cluster}, + + [Parameter(ParameterSetName='Write', Position=2)] + [ValidateNotNullOrEmpty()] + [string] + ${ZipPrefix}, + + [Parameter(ParameterSetName='Write')] + [ValidateNotNullOrEmpty()] + [int] + ${HoursOfEvents}, + + [Parameter(ParameterSetName='Write')] + [ValidateNotNullOrEmpty()] + [switch] + ${IncludeEvents}, + + [Parameter(ParameterSetName='Read', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${ReadFromPath} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterFaultDomain { + <# + .SYNOPSIS + Get-ClusterFaultDomain [[-Name] ] [-Type ] [-Id ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_FaultDomain')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('FaultDomainType')] + [ValidateNotNull()] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_FaultDomain.FaultDomainType[]] + ${Type}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [ValidateNotNull()] + [string[]] + ${Id}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterFaultDomainXML { + <# + .SYNOPSIS + Get-ClusterFaultDomainXML [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + [OutputType([System.String])] + param ( + [Parameter(ParameterSetName='GetFaultDomainXML2')] + [uint32] + ${Flags}, + + [Parameter(ParameterSetName='GetFaultDomainXML2')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='GetFaultDomainXML2')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='GetFaultDomainXML2')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterGroupSet { + <# + .SYNOPSIS + Get-ClusterGroupSet [[-Name] ] [-IsGlobal ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [ValidateNotNull()] + [bool[]] + ${IsGlobal}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterGroupSetDependency { + <# + .SYNOPSIS + Get-ClusterGroupSetDependency [-ContainedGroup ] [-Name ] [-Provider ] [-DependentGroup ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance[]])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='GetSetFrom3')] + [string] + ${ContainedGroup}, + + [Parameter(ParameterSetName='GetSetFrom3')] + [string] + ${Name}, + + [Parameter(ParameterSetName='GetSetFrom3')] + [string] + ${Provider}, + + [Parameter(ParameterSetName='GetSetFrom3')] + [string] + ${DependentGroup}, + + [Parameter(ParameterSetName='GetSetFrom3')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='GetSetFrom3')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='GetSetFrom3')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterHCSVM { + <# + .SYNOPSIS + Get-ClusterHCSVM [[-Name] ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_HCSVM')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterNodeSupportedVersion { + <# + .SYNOPSIS + Get-ClusterNodeSupportedVersion [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance[]])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_NodeSupportedVersion')] + param ( + [Parameter(ParameterSetName='GetNodeSupportedVersions0')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='GetNodeSupportedVersions0')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='GetNodeSupportedVersions0')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterPerformanceHistory { + <# + .SYNOPSIS + Get-ClusterPerformanceHistory [[-ClusterSeriesName] ] [[-TimeFrame] ] [[-Cluster] ] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory -SeriesKeyName -Stream [-UsePattern] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-ClusterNodeSeriesName] ] [[-TimeFrame] ] [-ClusterNode] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-VMSeriesName] ] [[-TimeFrame] ] [-VM] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-VHDSeriesName] ] [[-TimeFrame] ] [-VHD] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-PhysicalDiskSeriesName] ] [[-TimeFrame] ] [-PhysicalDisk] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-VolumeSeriesName] ] [[-TimeFrame] ] [-Volume] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-ClusterPerformanceHistory [[-NetAdapterSeriesName] ] [[-TimeFrame] ] [-NetworkAdapter] [-CimSession ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='ByCluster', SupportsShouldProcess=$true, ConfirmImpact='Medium')] + param ( + [Parameter(ParameterSetName='Api', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${SeriesKeyName}, + + [Parameter(ParameterSetName='Api', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${Stream}, + + [Parameter(ParameterSetName='Api')] + [switch] + ${UsePattern}, + + [Parameter(ParameterSetName='ByCluster', Position=0)] + [System.Object] + ${ClusterSeriesName}, + + [Parameter(ParameterSetName='ByClusterNode', Position=0)] + [System.Object] + ${ClusterNodeSeriesName}, + + [Parameter(ParameterSetName='ByVM', Position=0)] + [System.Object] + ${VMSeriesName}, + + [Parameter(ParameterSetName='ByVHD', Position=0)] + [System.Object] + ${VHDSeriesName}, + + [Parameter(ParameterSetName='ByPhysicalDisk', Position=0)] + [System.Object] + ${PhysicalDiskSeriesName}, + + [Parameter(ParameterSetName='ByVolume', Position=0)] + [System.Object] + ${VolumeSeriesName}, + + [Parameter(ParameterSetName='ByNetAdapter', Position=0)] + [System.Object] + ${NetAdapterSeriesName}, + + [Parameter(ParameterSetName='ByNetAdapter', Position=1)] + [Parameter(ParameterSetName='ByVolume', Position=1)] + [Parameter(ParameterSetName='ByPhysicalDisk', Position=1)] + [Parameter(ParameterSetName='ByVHD', Position=1)] + [Parameter(ParameterSetName='ByVM', Position=1)] + [Parameter(ParameterSetName='ByClusterNode', Position=1)] + [Parameter(ParameterSetName='ByCluster', Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateSet('MostRecent','LastHour','LastDay','LastWeek','LastMonth','LastYear')] + [string] + ${TimeFrame}, + + [Parameter(ParameterSetName='ByCluster', Position=2, ValueFromPipeline=$true)] + [Microsoft.FailoverClusters.PowerShell.Cluster] + ${Cluster}, + + [Parameter(ParameterSetName='ByClusterNode', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [Microsoft.FailoverClusters.PowerShell.ClusterNode[]] + ${ClusterNode}, + + [Parameter(ParameterSetName='ByVM', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.HyperV.PowerShell.VirtualMachine')] + [psobject[]] + ${VM}, + + [Parameter(ParameterSetName='ByVHD', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.Vhd.PowerShell.VirtualHardDisk')] + [psobject[]] + ${VHD}, + + [Parameter(ParameterSetName='ByPhysicalDisk', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#root/microsoft/windows/storage/MSFT_PhysicalDisk')] + [ciminstance[]] + ${PhysicalDisk}, + + [Parameter(ParameterSetName='ByVolume', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#root/microsoft/windows/storage/MSFT_Volume')] + [ciminstance[]] + ${Volume}, + + [Parameter(ParameterSetName='ByNetAdapter', Mandatory=$true, Position=2, ValueFromPipeline=$true)] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/MSFT_NetAdapter')] + [ciminstance[]] + ${NetworkAdapter}, + + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterScaleoutVolume { + <# + .SYNOPSIS + Get-ClusterScaleoutVolume [-VolumeName ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')] + param ( + [Parameter(ParameterSetName='WithVolId', HelpMessage='Supply a valid Scaleout Volume GUID')] + [string] + ${VolumeName} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterScaleoutZone { + <# + .SYNOPSIS + Get-ClusterScaleoutZone -VolumeName -ZoneId [-WhatIf] [-Confirm] [] + +Get-ClusterScaleoutZone -Vol -ZoneId [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')] + param ( + [Parameter(ParameterSetName='WithVolId', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume GUID')] + [string] + ${VolumeName}, + + [Parameter(ParameterSetName='WithVolObj', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume Object')] + [System.Object] + ${Vol}, + + [Parameter(Mandatory=$true, HelpMessage='Supply a valid existing data zone GUID')] + [string] + ${ZoneId} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterStorageNode { + <# + .SYNOPSIS + Get-ClusterStorageNode [[-Name] ] [-Id ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_StorageNode')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Id}, + + [Parameter(ParameterSetName='Query (cdxml)', Position=0)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterStorageSpacesDirect { + <# + .SYNOPSIS + Get-ClusterStorageSpacesDirect [-Node ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false, HelpUri='https://go.microsoft.com/fwlink/?LinkId=691107')] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_StorageSpacesDirect')] + param ( + [Parameter(ParameterSetName='DefaultParameterSet')] + [string] + ${Node}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-HealthFault { + <# + .SYNOPSIS + Get-HealthFault [[-Cluster] ] [-CimSession ] [-WhatIf] [-Confirm] [] + +Get-HealthFault [-ReportingType] [-ReportingKey] [-CimSession ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='ByCluster', SupportsShouldProcess=$true, ConfirmImpact='None')] + param ( + [Parameter(ParameterSetName='ByCluster', Position=0, ValueFromPipeline=$true)] + [Microsoft.FailoverClusters.PowerShell.Cluster] + ${Cluster}, + + [Parameter(ParameterSetName='ByApi', Mandatory=$true, Position=0)] + [System.Object] + ${ReportingType}, + + [Parameter(ParameterSetName='ByApi', Mandatory=$true, Position=1)] + [System.Object] + ${ReportingKey}, + + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Import-HealthAgentConfig { + <# + .SYNOPSIS + Import-HealthAgentConfig [-Type] [-FilePath] [[-CimSession] ] [] + #> + + [CmdletBinding()] + param ( + [Parameter(Mandatory=$true, Position=0, HelpMessage='Valid values are: MAConfig, HADefinition')] + [ValidateSet('MAConfig','HADefinition')] + [string] + ${Type}, + + [Parameter(Mandatory=$true, Position=1, HelpMessage='Input file path for the configuration file')] + [string] + ${FilePath}, + + [Parameter(Position=2, HelpMessage='CimSession')] + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Invoke-HealthCommand { + <# + .SYNOPSIS + Invoke-HealthCommand [-Name] [[-Flags] ] [[-Parameters] ] [[-Timeout] ] [[-CimSession] ] [] + #> + + [CmdletBinding()] + param ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(Position=1)] + [uint32] + ${Flags}, + + [Parameter(Position=2)] + [string[]] + ${Parameters}, + + [Parameter(Position=3)] + [uint32] + ${Timeout}, + + [Parameter(Position=4)] + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function New-ClusterAffinityRule { + <# + .SYNOPSIS + New-ClusterAffinityRule [-Name] [-RuleType ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_AffinityRule')] + param ( + [Parameter(ParameterSetName='CreateAffinityRule0', Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Name}, + + [Parameter(ParameterSetName='CreateAffinityRule0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_AffinityRule.RuleType] + ${RuleType}, + + [Parameter(ParameterSetName='CreateAffinityRule0')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='CreateAffinityRule0')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='CreateAffinityRule0')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function New-ClusterAvailabilitySet { + <# + .SYNOPSIS + New-ClusterAvailabilitySet [-Name] -UpdateDomains -FaultDomains [-Group ] [-ReserveSpareNode ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='CreateAvailabilitySet1', Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Name}, + + [Parameter(ParameterSetName='CreateAvailabilitySet1')] + [string[]] + ${Group}, + + [Parameter(ParameterSetName='CreateAvailabilitySet1', Mandatory=$true)] + [uint32] + ${UpdateDomains}, + + [Parameter(ParameterSetName='CreateAvailabilitySet1', Mandatory=$true)] + [uint32] + ${FaultDomains}, + + [Parameter(ParameterSetName='CreateAvailabilitySet1')] + [bool] + ${ReserveSpareNode}, + + [Parameter(ParameterSetName='CreateAvailabilitySet1')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='CreateAvailabilitySet1')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='CreateAvailabilitySet1')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function New-ClusterFaultDomain { + <# + .SYNOPSIS + New-ClusterFaultDomain -Name -FaultDomainType [-FaultDomain ] [-Description ] [-Location ] [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_FaultDomain')] + param ( + [Parameter(ParameterSetName='CreateFaultDomain0', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Name}, + + [Parameter(ParameterSetName='CreateFaultDomain0')] + [Alias('Parent')] + [string] + ${FaultDomain}, + + [Parameter(ParameterSetName='CreateFaultDomain0', Mandatory=$true)] + [Alias('Type')] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_FaultDomain.FaultDomainType] + ${FaultDomainType}, + + [Parameter(ParameterSetName='CreateFaultDomain0')] + [string] + ${Description}, + + [Parameter(ParameterSetName='CreateFaultDomain0')] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Location}, + + [Parameter(ParameterSetName='CreateFaultDomain0')] + [uint32] + ${Flags}, + + [Parameter(ParameterSetName='CreateFaultDomain0')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='CreateFaultDomain0')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='CreateFaultDomain0')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function New-ClusterGroupSet { + <# + .SYNOPSIS + New-ClusterGroupSet [-Name] [-Group ] [-Providers ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='CreateSet0', Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Name}, + + [Parameter(ParameterSetName='CreateSet0')] + [string[]] + ${Group}, + + [Parameter(ParameterSetName='CreateSet0')] + [string[]] + ${Providers}, + + [Parameter(ParameterSetName='CreateSet0')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='CreateSet0')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='CreateSet0')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function New-ClusterHCSVM { + <# + .SYNOPSIS + New-ClusterHCSVM [-Name] [-SwitchName ] [-ExtendedVmConfiguration ] [-MemorySizeInMb ] [-CpuCount ] [-VhdPath ] [-VmName ] [-OfflineAction ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCluster/MSCluster_HCSVM')] + param ( + [Parameter(ParameterSetName='NewClusterHCSVM0', Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Name}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [string] + ${SwitchName}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [string] + ${ExtendedVmConfiguration}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [uint32] + ${MemorySizeInMb}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [uint32] + ${CpuCount}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [string] + ${VhdPath}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [string] + ${VmName}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [uint32] + ${OfflineAction}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='NewClusterHCSVM0')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function New-ClusterScaleoutVolume { + <# + .SYNOPSIS + New-ClusterScaleoutVolume -VolumeName [-GroupId ] [-FriendlyName ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')] + param ( + [Parameter(ParameterSetName='WithVolId', Mandatory=$true, HelpMessage='Supply a valid volume GUID')] + [string] + ${VolumeName}, + + [Parameter(HelpMessage='Supply a group ID')] + [string] + ${GroupId}, + + [Parameter(HelpMessage='Supply a group ID')] + [string] + ${FriendlyName} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterAffinityRule { + <# + .SYNOPSIS + Remove-ClusterAffinityRule [[-Name] ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + +Remove-ClusterAffinityRule -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_AffinityRule')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_AffinityRule')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterFaultDomain { + <# + .SYNOPSIS + Remove-ClusterFaultDomain [[-Name] ] [-Id ] [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + +Remove-ClusterFaultDomain -InputObject [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_FaultDomain')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [ValidateNotNull()] + [string[]] + ${Id}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_FaultDomain')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [uint32] + ${Flags}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterGroupFromAffinityRule { + <# + .SYNOPSIS + Remove-ClusterGroupFromAffinityRule [[-Name] ] [-Groups] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Remove-ClusterGroupFromAffinityRule [-Groups] -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_AffinityRule')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [Alias('Set')] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_AffinityRule')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, Position=1)] + [Parameter(ParameterSetName='Query (cdxml)', Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string[]] + ${Groups}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterGroupFromSet { + <# + .SYNOPSIS + Remove-ClusterGroupFromSet [[-Name] ] [-Group] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Remove-ClusterGroupFromSet [-Group] -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [Alias('Set')] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_GroupSet')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, Position=1)] + [Parameter(ParameterSetName='Query (cdxml)', Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Group}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterGroupSet { + <# + .SYNOPSIS + Remove-ClusterGroupSet [[-Name] ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + +Remove-ClusterGroupSet -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_GroupSet')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterGroupSetDependency { + <# + .SYNOPSIS + Remove-ClusterGroupSetDependency [[-Name] ] [-Provider] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Remove-ClusterGroupSetDependency [-Provider] -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_GroupSet')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, Position=1)] + [Parameter(ParameterSetName='Query (cdxml)', Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${Provider}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterHCSVM { + <# + .SYNOPSIS + Remove-ClusterHCSVM [[-Name] ] [-Force ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + +Remove-ClusterHCSVM -InputObject [-Force ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_HCSVM')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_HCSVM')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [bool] + ${Force}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterScaleoutVolume { + <# + .SYNOPSIS + Remove-ClusterScaleoutVolume -VolumeName [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High')] + param ( + [Parameter(ParameterSetName='WithVolId', Mandatory=$true, HelpMessage='Supply a valid volume GUID')] + [string] + ${VolumeName} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterScaleoutZone { + <# + .SYNOPSIS + Remove-ClusterScaleoutZone -VolumeName -ZoneId [-Force ] [-WhatIf] [-Confirm] [] + +Remove-ClusterScaleoutZone -Vol -ZoneId [-Force ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='High')] + param ( + [Parameter(ParameterSetName='WithVolId', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume GUID')] + [string] + ${VolumeName}, + + [Parameter(ParameterSetName='WithVolObj', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume Object')] + [System.Object] + ${Vol}, + + [Parameter(Mandatory=$true, HelpMessage='Supply a valid existing data zone GUID')] + [string] + ${ZoneId}, + + [Parameter(HelpMessage='Force removal')] + [bool] + ${Force} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterSharedVolumeFromAffinityRule { + <# + .SYNOPSIS + Remove-ClusterSharedVolumeFromAffinityRule [[-Name] ] [-ClusterSharedVolumes] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Remove-ClusterSharedVolumeFromAffinityRule [-ClusterSharedVolumes] -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_AffinityRule')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [Alias('Set')] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_AffinityRule')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, Position=1)] + [Parameter(ParameterSetName='Query (cdxml)', Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string[]] + ${ClusterSharedVolumes}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterStorageNode { + <# + .SYNOPSIS + Remove-ClusterStorageNode [[-Name] ] [-Id ] [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + +Remove-ClusterStorageNode -InputObject [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_StorageNode')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Id}, + + [Parameter(ParameterSetName='Query (cdxml)', Position=0)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_StorageNode')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [uint32] + ${Flags}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Repair-ClusterStorageSpacesDirect { + <# + .SYNOPSIS + Repair-ClusterStorageSpacesDirect [-DisableStorageMaintenanceMode] [-RecoverUnboundDrives] [-Node ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + +Repair-ClusterStorageSpacesDirect [-DisableStorageMaintenanceMode] [-Node ] [-SkipDiskRecovery] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='DefaultParameterSet', SupportsShouldProcess=$true, ConfirmImpact='High', PositionalBinding=$false)] + param ( + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${DisableStorageMaintenanceMode}, + + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${RecoverUnboundDrives}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [string] + ${Node}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [switch] + ${SkipDiskRecovery}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='SkipDiskRecoverySet')] + [Parameter(ParameterSetName='DefaultParameterSet')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterAffinityRule { + <# + .SYNOPSIS + Set-ClusterAffinityRule [[-Name] ] [-RuleType ] [-Enabled ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Set-ClusterAffinityRule -InputObject [-RuleType ] [-Enabled ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_AffinityRule')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_AffinityRule')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_AffinityRule.RuleType] + ${RuleType}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [uint32] + ${Enabled}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterFaultDomain { + <# + .SYNOPSIS + Set-ClusterFaultDomain [[-Name] ] [-Id ] [-NewName ] [-Location ] [-Description ] [-FaultDomain ] [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Set-ClusterFaultDomain -InputObject [-NewName ] [-Location ] [-Description ] [-FaultDomain ] [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_FaultDomain')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [ValidateNotNull()] + [string[]] + ${Id}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_FaultDomain')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [string] + ${NewName}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [string] + ${Location}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [string] + ${Description}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Parent')] + [string] + ${FaultDomain}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [uint32] + ${Flags}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterFaultDomainXML { + <# + .SYNOPSIS + Set-ClusterFaultDomainXML [-XML] [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false)] + param ( + [Parameter(ParameterSetName='SetFaultDomainXML1', Mandatory=$true, Position=0, ValueFromPipeline=$true)] + [ValidateNotNullOrEmpty()] + [ValidateNotNull()] + [string] + ${XML}, + + [Parameter(ParameterSetName='SetFaultDomainXML1')] + [uint32] + ${Flags}, + + [Parameter(ParameterSetName='SetFaultDomainXML1')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='SetFaultDomainXML1')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='SetFaultDomainXML1')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterGroupSet { + <# + .SYNOPSIS + Set-ClusterGroupSet [[-Name] ] [-StartupDelayTrigger ] [-StartupCount ] [-IsGlobal ] [-StartupDelay ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Set-ClusterGroupSet -InputObject [-StartupDelayTrigger ] [-StartupCount ] [-IsGlobal ] [-StartupDelay ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_GroupSet')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_GroupSet')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_GroupSet.StartupSettingType] + ${StartupDelayTrigger}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Count')] + [uint32] + ${StartupCount}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [bool] + ${IsGlobal}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Delay')] + [uint32] + ${StartupDelay}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterHCSVM { + <# + .SYNOPSIS + Set-ClusterHCSVM [[-Name] ] [-NewName ] [-ExtendedVmConfiguration ] [-OfflineAction ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Set-ClusterHCSVM -InputObject [-NewName ] [-ExtendedVmConfiguration ] [-OfflineAction ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_HCSVM')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_HCSVM')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [string] + ${NewName}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [string] + ${ExtendedVmConfiguration}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [uint32] + ${OfflineAction}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterScaleoutVolumeZoneTargetPath { + <# + .SYNOPSIS + Set-ClusterScaleoutVolumeZoneTargetPath -VolumeName -ZoneId -ZoneTarget [-WhatIf] [-Confirm] [] + +Set-ClusterScaleoutVolumeZoneTargetPath -Vol -ZoneId -ZoneTarget [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')] + param ( + [Parameter(ParameterSetName='WithVolId', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume GUID')] + [string] + ${VolumeName}, + + [Parameter(ParameterSetName='WithVolObj', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume Object')] + [System.Object] + ${Vol}, + + [Parameter(Mandatory=$true, HelpMessage='Supply a valid existing data zone GUID')] + [string] + ${ZoneId}, + + [Parameter(Mandatory=$true, HelpMessage='Supply a target zone')] + [string] + ${ZoneTarget} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterScaleoutZoneGroupId { + <# + .SYNOPSIS + Set-ClusterScaleoutZoneGroupId -VolumeName -ZoneId -GroupId [-WhatIf] [-Confirm] [] + +Set-ClusterScaleoutZoneGroupId -Vol -ZoneId -GroupId [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')] + param ( + [Parameter(ParameterSetName='WithVolId', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume GUID')] + [string] + ${VolumeName}, + + [Parameter(ParameterSetName='WithVolObj', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume Object')] + [System.Object] + ${Vol}, + + [Parameter(Mandatory=$true, HelpMessage='Supply a valid existing data zone GUID')] + [string] + ${ZoneId}, + + [Parameter(Mandatory=$true, HelpMessage='Supply a new group ID')] + [string] + ${GroupId} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterStorageNode { + <# + .SYNOPSIS + Set-ClusterStorageNode [[-Name] ] [-Id ] [-NewName ] [-Description ] [-Location ] [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Set-ClusterStorageNode -InputObject [-NewName ] [-Description ] [-Location ] [-Flags ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_StorageNode')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='Query (cdxml)')] + [ValidateNotNull()] + [string[]] + ${Id}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_StorageNode')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [string] + ${NewName}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [string] + ${Description}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [string] + ${Location}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [uint32] + ${Flags}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterStorageSpacesDirect { + <# + .SYNOPSIS + Set-ClusterStorageSpacesDirect [-CacheState ] [-CacheModeHDD ] [-CacheModeSSD ] [-Nodes ] [-ScmUse ] [-SkipEligibilityChecks] [-SedProtectionState ] [-UseSedExclusively ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [] + #> + + [CmdletBinding(PositionalBinding=$false, HelpUri='https://go.microsoft.com/fwlink/?LinkId=691106')] + param ( + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.CacheStateType] + ${CacheState}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.CacheModeType] + ${CacheModeHDD}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.CacheModeType] + ${CacheModeSSD}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [string[]] + ${Nodes}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.ScmUse] + ${ScmUse}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [switch] + ${SkipEligibilityChecks}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Microsoft.PowerShell.Cmdletization.GeneratedTypes.MSCLUSTER.MSCluster_StorageSpacesDirect.SedProtectionStateType] + ${SedProtectionState}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [bool] + ${UseSedExclusively}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='SetStorageSpacesDirect0')] + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterStorageSpacesDirectDisk { + <# + .SYNOPSIS + Set-ClusterStorageSpacesDirectDisk -PhysicalDiskGuid [-CanBeClaimed ] [-Reset] [-CacheUsage ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + +Set-ClusterStorageSpacesDirectDisk -PhysicalDisk [-CanBeClaimed ] [-Reset] [-CacheUsage ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='ByPhysicalDiskGuid', SupportsShouldProcess=$true, ConfirmImpact='High')] + param ( + [Parameter(ParameterSetName='ByPhysicalDiskGuid', Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string[]] + ${PhysicalDiskGuid}, + + [Parameter(ParameterSetName='ByPhysicalDisk', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNullOrEmpty()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisk')] + [ciminstance[]] + ${PhysicalDisk}, + + [Parameter(ParameterSetName='ByPhysicalDisk')] + [Parameter(ParameterSetName='ByPhysicalDiskGuid')] + [bool] + ${CanBeClaimed}, + + [Parameter(ParameterSetName='ByPhysicalDisk')] + [Parameter(ParameterSetName='ByPhysicalDiskGuid')] + [switch] + ${Reset}, + + [Parameter(ParameterSetName='ByPhysicalDisk')] + [Parameter(ParameterSetName='ByPhysicalDiskGuid')] + [hasthable] + ${CacheUsage}, + + [CimSession] + ${CimSession}, + + [int] + ${ThrottleLimit}, + + [switch] + ${AsJob} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Start-ClusterHCSVM { + <# + .SYNOPSIS + Start-ClusterHCSVM [[-Name] ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Start-ClusterHCSVM -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_HCSVM')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_HCSVM')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Start-ClusterPerformanceHistory { + <# + .SYNOPSIS + Start-ClusterPerformanceHistory [[-CimSession] ] [] + #> + + [CmdletBinding()] + param ( + [Parameter(Position=0)] + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Stop-ClusterHCSVM { + <# + .SYNOPSIS + Stop-ClusterHCSVM [[-Name] ] [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + +Stop-ClusterHCSVM -InputObject [-CimSession ] [-ThrottleLimit ] [-AsJob] [-PassThru] [] + #> + + [CmdletBinding(DefaultParameterSetName='Query (cdxml)', PositionalBinding=$false)] + [OutputType([Microsoft.Management.Infrastructure.CimInstance])] + [OutputType('Microsoft.Management.Infrastructure.CimInstance#root/MSCLUSTER/MSCluster_HCSVM')] + param ( + [Parameter(ParameterSetName='Query (cdxml)', Position=0, ValueFromPipelineByPropertyName=$true)] + [ValidateNotNull()] + [string[]] + ${Name}, + + [Parameter(ParameterSetName='InputObject (cdxml)', Mandatory=$true, ValueFromPipeline=$true)] + [ValidateNotNull()] + [PSTypeName('Microsoft.Management.Infrastructure.CimInstance#MSCluster_HCSVM')] + [ciminstance[]] + ${InputObject}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [Alias('Session')] + [ValidateNotNullOrEmpty()] + [CimSession[]] + ${CimSession}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [int] + ${ThrottleLimit}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${AsJob}, + + [Parameter(ParameterSetName='InputObject (cdxml)')] + [Parameter(ParameterSetName='Query (cdxml)')] + [switch] + ${PassThru} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Stop-ClusterPerformanceHistory { + <# + .SYNOPSIS + Stop-ClusterPerformanceHistory [[-CimSession] ] [-DeleteHistory] [] + #> + + [CmdletBinding()] + param ( + [switch] + ${DeleteHistory}, + + [Parameter(Position=0)] + [CimSession] + ${CimSession} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Suspend-ClusterScaleoutZone { + <# + .SYNOPSIS + Suspend-ClusterScaleoutZone -VolumeName -ZoneId [-WhatIf] [-Confirm] [] + +Suspend-ClusterScaleoutZone -Vol -ZoneId [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')] + param ( + [Parameter(ParameterSetName='WithVolId', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume GUID')] + [string] + ${VolumeName}, + + [Parameter(ParameterSetName='WithVolObj', Mandatory=$true, HelpMessage='Supply a valid Scaleout Volume Object')] + [System.Object] + ${Vol}, + + [Parameter(Mandatory=$true, HelpMessage='Supply a valid existing data zone GUID')] + [string] + ${ZoneId} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterCheckpoint { + <# + .SYNOPSIS + Add-ClusterCheckpoint [[-ResourceName] ] [-CryptoCheckpointName ] [-CryptoCheckpointType ] [-CryptoCheckpointKey ] [-RegistryCheckpoint ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216179')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterRegistryCheckpoint])] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterCryptoCheckpoint])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${ResourceName}, + + [Parameter(HelpMessage='Name of crypto checkpoint to add.')] + [string] + ${CryptoCheckpointName}, + + [Parameter(HelpMessage='Type of crypto checkpoint to add.')] + [string] + ${CryptoCheckpointType}, + + [Parameter(HelpMessage='Key of crypto checkpoint to add.')] + [string] + ${CryptoCheckpointKey}, + + [Parameter(HelpMessage='Name of registry checkpoint to add.')] + [string] + ${RegistryCheckpoint}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterDisk { + <# + .SYNOPSIS + Add-ClusterDisk [-InputObject] [-Cluster ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216180')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject[]] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterFileServerRole { + <# + .SYNOPSIS + Add-ClusterFileServerRole [[-Name] ] -Storage [-StaticAddress ] [-IgnoreNetwork ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216183')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Storage}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${StaticAddress}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${IgnoreNetwork}, + + [Parameter(Position=0)] + [string] + ${Name}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterGenericApplicationRole { + <# + .SYNOPSIS + Add-ClusterGenericApplicationRole [[-Name] ] -CommandLine [-Parameters ] [-CheckpointKey ] [-Storage ] [-StaticAddress ] [-IgnoreNetwork ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216184')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${CommandLine}, + + [string] + ${Parameters}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${CheckpointKey}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Storage}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${StaticAddress}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${IgnoreNetwork}, + + [Parameter(Position=0)] + [string] + ${Name}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterGenericScriptRole { + <# + .SYNOPSIS + Add-ClusterGenericScriptRole [[-Name] ] -ScriptFilePath [-Storage ] [-StaticAddress ] [-IgnoreNetwork ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216186')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${ScriptFilePath}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Storage}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${StaticAddress}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${IgnoreNetwork}, + + [Parameter(Position=0)] + [string] + ${Name}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterGenericServiceRole { + <# + .SYNOPSIS + Add-ClusterGenericServiceRole [[-Name] ] -ServiceName [-CheckpointKey ] [-Storage ] [-StaticAddress ] [-IgnoreNetwork ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216187')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${ServiceName}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${CheckpointKey}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Storage}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${StaticAddress}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${IgnoreNetwork}, + + [Parameter(Position=0)] + [string] + ${Name}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterGroup { + <# + .SYNOPSIS + Add-ClusterGroup [-Name] [[-GroupType] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216189')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(Position=1)] + [Microsoft.FailoverClusters.PowerShell.GroupType] + ${GroupType}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusteriSCSITargetServerRole { + <# + .SYNOPSIS + Add-ClusteriSCSITargetServerRole [[-Name] ] -Storage [-StaticAddress ] [-IgnoreNetwork ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=229636')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Storage}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${StaticAddress}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${IgnoreNetwork}, + + [Parameter(Position=0)] + [string] + ${Name}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterNode { + <# + .SYNOPSIS + Add-ClusterNode [[-Name] ] [-Type ] [-NoStorage] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216190')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Microsoft.FailoverClusters.PowerShell.NodeType] + ${Type}, + + [switch] + ${NoStorage}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterResource { + <# + .SYNOPSIS + Add-ClusterResource [-Name] [[-Group] ] [-ResourceType] [-SeparateMonitor] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216192')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(Position=1)] + [ValidateNotNullOrEmpty()] + [string] + ${Group}, + + [Parameter(Mandatory=$true, Position=2)] + [Alias('ResType','Type')] + [ValidateNotNullOrEmpty()] + [string] + ${ResourceType}, + + [switch] + ${SeparateMonitor}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterResourceDependency { + <# + .SYNOPSIS + Add-ClusterResourceDependency [[-Resource] ] [[-Provider] ] [-Reason ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216193')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Resource}, + + [Parameter(Position=1)] + [ValidateNotNullOrEmpty()] + [string] + ${Provider}, + + [string] + ${Reason}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterResourceType { + <# + .SYNOPSIS + Add-ClusterResourceType [-Name] [-Dll] [[-DisplayName] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216194')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResourceType])] + param ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(Mandatory=$true, Position=1)] + [ValidateNotNullOrEmpty()] + [string] + ${Dll}, + + [Parameter(Position=2)] + [ValidateNotNullOrEmpty()] + [string] + ${DisplayName}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterScaleOutFileServerRole { + <# + .SYNOPSIS + Add-ClusterScaleOutFileServerRole [[-Name] ] [-Infrastructure] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216200')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(HelpMessage='Create Cluster Infrastructure Scale Out File Server.')] + [Alias('Infra')] + [switch] + ${Infrastructure}, + + [Parameter(Position=0)] + [string] + ${Name}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterServerRole { + <# + .SYNOPSIS + Add-ClusterServerRole [[-Name] ] [-DnsName ] [-NetworkNameName ] [-Storage ] [-StaticAddress ] [-IgnoreNetwork ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216195')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [string] + ${DnsName}, + + [string] + ${NetworkNameName}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Storage}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${StaticAddress}, + + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${IgnoreNetwork}, + + [Parameter(Position=0)] + [string] + ${Name}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterSharedVolume { + <# + .SYNOPSIS + Add-ClusterSharedVolume [[-Name] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216196')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterVirtualMachineRole { + <# + .SYNOPSIS + Add-ClusterVirtualMachineRole [[-VMName] ] [-Name ] [-VirtualMachine ] [-VMId ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216198')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(Position=0, ValueFromPipelineByPropertyName=$true)] + [string] + ${VMName}, + + [Alias('VM')] + [string] + ${VirtualMachine}, + + [Parameter(ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Add-ClusterVMMonitoredItem { + <# + .SYNOPSIS + Add-ClusterVMMonitoredItem [[-VirtualMachine] ] [-Service ] [-EventLog ] [-EventSource ] [-EventId ] [-OverrideServiceRecoveryActions] [-Wait ] [-Cluster ] [] + +Add-ClusterVMMonitoredItem [-Service ] [-EventLog ] [-EventSource ] [-EventId ] [-OverrideServiceRecoveryActions] [-VMId ] [-Wait ] [-Cluster ] [] + +Add-ClusterVMMonitoredItem [-Service ] [-EventLog ] [-EventSource ] [-EventId ] [-OverrideServiceRecoveryActions] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='VirtualMachine', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216199')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterVMMonitoredItem])] + param ( + [System.Collections.Specialized.StringCollection] + ${Service}, + + [string] + ${EventLog}, + + [string] + ${EventSource}, + + [int] + ${EventId}, + + [switch] + ${OverrideServiceRecoveryActions}, + + [Parameter(ParameterSetName='VirtualMachine', Position=0)] + [Alias('VM')] + [ValidateNotNullOrEmpty()] + [string] + ${VirtualMachine}, + + [Parameter(ParameterSetName='VMId', ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Block-ClusterAccess { + <# + .SYNOPSIS + Block-ClusterAccess [-User] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216202')] + param ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${User}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Clear-ClusterDiskReservation { + <# + .SYNOPSIS + Clear-ClusterDiskReservation [[-Node] ] -Disk [-Force] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216203')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Node}, + + [Parameter(Mandatory=$true)] + [uint32[]] + ${Disk}, + + [switch] + ${Force} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Clear-ClusterNode { + <# + .SYNOPSIS + Clear-ClusterNode [[-Name] ] [-Force] [-Wait ] [-CleanupDisks] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216205')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [switch] + ${Force}, + + [int] + ${Wait}, + + [switch] + ${CleanupDisks}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-Cluster { + <# + .SYNOPSIS + Get-Cluster [[-Name] ] [-Domain ] [] + +Get-Cluster [-ClusterSet ] [-Domain ] [] + #> + + [CmdletBinding(DefaultParameterSetName='Name', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216206')] + [OutputType([Microsoft.FailoverClusters.PowerShell.Cluster])] + param ( + [Parameter(ParameterSetName='Name', Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(ParameterSetName='ClusterSet', ValueFromPipeline=$true)] + [ValidateNotNullOrEmpty()] + [ciminstance] + ${ClusterSet}, + + [string] + ${Domain} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterAccess { + <# + .SYNOPSIS + Get-ClusterAccess [[-User] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216207')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterAccessRule])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${User}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterAvailableDisk { + <# + .SYNOPSIS + Get-ClusterAvailableDisk [[-Cluster] ] [-Disk ] [-All] [-InputObject ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216208')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterDiskInfo])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Cluster}, + + [Parameter(ValueFromPipeline=$true)] + [ValidateNotNull()] + [ciminstance] + ${Disk}, + + [switch] + ${All}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterBitLockerProtector { + <# + .SYNOPSIS + Get-ClusterBitLockerProtector [[-Name] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216245')] + [OutputType([System.Collections.Generic.IEnumerable`1[System.String]])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterCheckpoint { + <# + .SYNOPSIS + Get-ClusterCheckpoint [[-ResourceName] ] [-CheckpointName ] [-RegistryCheckpoint] [-CryptoCheckpoint] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216209')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterRegistryCheckpoint])] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterCryptoCheckpoint])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${ResourceName}, + + [Parameter(HelpMessage='Searches for checkpoints with a specific name, wildcard expressions are accepted.')] + [string] + ${CheckpointName}, + + [Parameter(HelpMessage='If specified, command will output registry checkpoints.')] + [switch] + ${RegistryCheckpoint}, + + [Parameter(HelpMessage='If specified, command will output crypto checkpoints.')] + [switch] + ${CryptoCheckpoint}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterGroup { + <# + .SYNOPSIS + Get-ClusterGroup [[-Name] ] [-VMId ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216210')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterLog { + <# + .SYNOPSIS + Get-ClusterLog [[-Node] ] [-Destination ] [-PerformanceHistoryTimeFrame ] [-TimeSpan ] [-UseLocalTime] [-SkipClusterState] [-Health] [-Netft] [-ExportClusterPerformanceHistory] [-NetworkDiagnostics] [-NetworkDiagnosticsLevel ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216212')] + [OutputType([System.IO.FileInfo])] + param ( + [Parameter(Position=0)] + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${Node}, + + [ValidateNotNullOrEmpty()] + [string] + ${Destination}, + + [ValidateNotNullOrEmpty()] + [string] + ${PerformanceHistoryTimeFrame}, + + [Alias('Span')] + [uint32] + ${TimeSpan}, + + [Parameter(HelpMessage='Generate the cluster log using local time instead of GMT.')] + [Alias('lt')] + [switch] + ${UseLocalTime}, + + [Parameter(HelpMessage='Generate the cluster log without retrieving cluster state information.')] + [Alias('scs')] + [switch] + ${SkipClusterState}, + + [Parameter(HelpMessage='Generate the cluster health logs.')] + [switch] + ${Health}, + + [Parameter(HelpMessage='Generate the cluster netft logs.')] + [switch] + ${Netft}, + + [Parameter(HelpMessage='Export the ClusterPorformanceHistory data.')] + [switch] + ${ExportClusterPerformanceHistory}, + + [Parameter(HelpMessage='Generate the cluster network diagnotics logs.')] + [switch] + ${NetworkDiagnostics}, + + [Parameter(HelpMessage='Specifies the level of depth of the network diagnotics logs.')] + [int] + ${NetworkDiagnosticsLevel}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterNetwork { + <# + .SYNOPSIS + Get-ClusterNetwork [[-Name] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216213')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterNetwork])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterNetworkInterface { + <# + .SYNOPSIS + Get-ClusterNetworkInterface [[-Name] ] [-Node ] [-Network ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216214')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterNetworkInterface])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Node}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Network}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterNode { + <# + .SYNOPSIS + Get-ClusterNode [[-Name] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216215')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterNode])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterOwnerNode { + <# + .SYNOPSIS + Get-ClusterOwnerNode [-Resource ] [-Group ] [-ResourceType ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216216')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterOwnerNodeList])] + param ( + [Alias('Res')] + [ValidateNotNullOrEmpty()] + [string] + ${Resource}, + + [ValidateNotNullOrEmpty()] + [string] + ${Group}, + + [Alias('ResType')] + [ValidateNotNullOrEmpty()] + [string] + ${ResourceType}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterParameter { + <# + .SYNOPSIS + Get-ClusterParameter [[-Name] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216217')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterParameter])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterQuorum { + <# + .SYNOPSIS + Get-ClusterQuorum [[-Cluster] ] [-InputObject ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216218')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterQuorumSettings])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Cluster}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterResource { + <# + .SYNOPSIS + Get-ClusterResource [[-Name] ] [-VMId ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216219')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterResourceDependency { + <# + .SYNOPSIS + Get-ClusterResourceDependency [[-Resource] ] [-Guid] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216220')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResourceDependency])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Resource}, + + [switch] + ${Guid}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterResourceDependencyReport { + <# + .SYNOPSIS + Get-ClusterResourceDependencyReport [-Resource ] [-Group ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216221')] + [OutputType([System.IO.FileInfo])] + param ( + [ValidateNotNullOrEmpty()] + [string] + ${Resource}, + + [ValidateNotNullOrEmpty()] + [string] + ${Group}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterResourceType { + <# + .SYNOPSIS + Get-ClusterResourceType [[-Name] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216222')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResourceType])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterSharedVolume { + <# + .SYNOPSIS + Get-ClusterSharedVolume [[-Name] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216223')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterSharedVolumeState { + <# + .SYNOPSIS + Get-ClusterSharedVolumeState [[-Name] ] [-Node ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding()] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolumeStateInfo])] + param ( + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Node}, + + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Get-ClusterVMMonitoredItem { + <# + .SYNOPSIS + Get-ClusterVMMonitoredItem [[-VirtualMachine] ] [-Wait ] [-Cluster ] [] + +Get-ClusterVMMonitoredItem [-VMId ] [-Wait ] [-Cluster ] [] + +Get-ClusterVMMonitoredItem [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='VirtualMachine', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216224')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterVMMonitoredItem])] + param ( + [Parameter(ParameterSetName='VirtualMachine', Position=0)] + [Alias('VM')] + [ValidateNotNullOrEmpty()] + [string] + ${VirtualMachine}, + + [Parameter(ParameterSetName='VMId', ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Grant-ClusterAccess { + <# + .SYNOPSIS + Grant-ClusterAccess [-User] [-Full] [-ReadOnly] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216225')] + param ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${User}, + + [switch] + ${Full}, + + [switch] + ${ReadOnly}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Move-ClusterGroup { + <# + .SYNOPSIS + Move-ClusterGroup [[-Name] ] [[-Node] ] [-IgnoreLocked] [-IgnoreAffinityRule] [-Reason ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216226')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(Position=1)] + [ValidateNotNullOrEmpty()] + [string] + ${Node}, + + [switch] + ${IgnoreLocked}, + + [switch] + ${IgnoreAffinityRule}, + + [string] + ${Reason}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Move-ClusterResource { + <# + .SYNOPSIS + Move-ClusterResource [[-Name] ] [[-Group] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216227')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNull()] + [string] + ${Name}, + + [Parameter(Position=1)] + [ValidateNotNull()] + [string] + ${Group}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Move-ClusterSharedVolume { + <# + .SYNOPSIS + Move-ClusterSharedVolume [[-Name] ] [[-Node] ] [-Reason ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216228')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(Position=1)] + [ValidateNotNullOrEmpty()] + [string] + ${Node}, + + [string] + ${Reason}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Move-ClusterVirtualMachineRole { + <# + .SYNOPSIS + Move-ClusterVirtualMachineRole [[-Name] ] [[-Node] ] [-Cancel] [-MigrationType ] [-IgnoreLocked] [-IgnoreAffinityRule] [-VMId ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216229')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(Position=1)] + [ValidateNotNullOrEmpty()] + [string] + ${Node}, + + [switch] + ${Cancel}, + + [Microsoft.FailoverClusters.NativeHelp.NativeGroupHelp+VmMigrationType] + ${MigrationType}, + + [switch] + ${IgnoreLocked}, + + [switch] + ${IgnoreAffinityRule}, + + [Parameter(ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function New-Cluster { + <# + .SYNOPSIS + New-Cluster [-Name] [-Node ] [-StaticAddress ] [-IgnoreNetwork ] [-NoStorage] [-AdministrativeAccessPoint ] [-Force] [-ManagementPointNetworkType ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216230')] + [OutputType([Microsoft.FailoverClusters.PowerShell.Cluster])] + param ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Node}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${StaticAddress}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${IgnoreNetwork}, + + [switch] + ${NoStorage}, + + [Alias('aap')] + [Microsoft.FailoverClusters.PowerShell.AdminAccessPoint] + ${AdministrativeAccessPoint}, + + [switch] + ${Force}, + + [Alias('apnt')] + [Microsoft.FailoverClusters.PowerShell.AdminAccessPointResType] + ${ManagementPointNetworkType} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function New-ClusterNameAccount { + <# + .SYNOPSIS + New-ClusterNameAccount -Name [-Credentials ] [-Domain ] [-ManagementPointNetworkType ] [-UpgradeVCOs] [-InputObject ] [-Cluster ] [] + +New-ClusterNameAccount -Name -Credentials -Domain [-ManagementPointNetworkType ] [-UpgradeVCOs] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject')] + param ( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(ParameterSetName='Credentials', Mandatory=$true)] + [Parameter(ParameterSetName='InputObject')] + [pscredential] + ${Credentials}, + + [Parameter(ParameterSetName='Credentials', Mandatory=$true)] + [Parameter(ParameterSetName='InputObject')] + [string] + ${Domain}, + + [Microsoft.FailoverClusters.PowerShell.AdminAccessPointResType] + ${ManagementPointNetworkType}, + + [switch] + ${UpgradeVCOs}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-Cluster { + <# + .SYNOPSIS + Remove-Cluster [[-Cluster] ] [-CleanupAD] [-Force] [-InputObject ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216231')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Cluster}, + + [switch] + ${CleanupAD}, + + [switch] + ${Force}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterAccess { + <# + .SYNOPSIS + Remove-ClusterAccess [[-User] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216232')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${User}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterCheckpoint { + <# + .SYNOPSIS + Remove-ClusterCheckpoint [[-ResourceName] ] [-Force] [-CheckpointName ] [-RegistryCheckpoint] [-CryptoCheckpoint] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216233')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${ResourceName}, + + [switch] + ${Force}, + + [Parameter(HelpMessage='Searches for checkpoints with a specific name, regular expressions are accepted.')] + [string] + ${CheckpointName}, + + [Parameter(HelpMessage='If specified, command will remove registry checkpoints.')] + [switch] + ${RegistryCheckpoint}, + + [Parameter(HelpMessage='If specified, command will remove crypto checkpoints.')] + [switch] + ${CryptoCheckpoint}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterGroup { + <# + .SYNOPSIS + Remove-ClusterGroup [[-Name] ] [-VMId ] [-Force] [-RemoveResources] [-Reason ] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216234')] + param ( + [Parameter(ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [switch] + ${Force}, + + [switch] + ${RemoveResources}, + + [string] + ${Reason}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterNameAccount { + <# + .SYNOPSIS + Remove-ClusterNameAccount [-DeleteComputerObjects] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject')] + param ( + [switch] + ${DeleteComputerObjects}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterNode { + <# + .SYNOPSIS + Remove-ClusterNode [[-Name] ] [-Force] [-Wait ] [-IgnoreStorageConnectivityLoss] [-CleanupDisks] [-Reason ] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216235')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [switch] + ${Force}, + + [int] + ${Wait}, + + [switch] + ${IgnoreStorageConnectivityLoss}, + + [switch] + ${CleanupDisks}, + + [string] + ${Reason}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterResource { + <# + .SYNOPSIS + Remove-ClusterResource [[-Name] ] [-Force] [-Reason ] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216236')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [switch] + ${Force}, + + [string] + ${Reason}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterResourceDependency { + <# + .SYNOPSIS + Remove-ClusterResourceDependency [[-Resource] ] [[-Provider] ] [-Reason ] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216237')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Resource}, + + [Parameter(Position=1)] + [ValidateNotNullOrEmpty()] + [string] + ${Provider}, + + [string] + ${Reason}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterResourceType { + <# + .SYNOPSIS + Remove-ClusterResourceType [[-Name] ] [-Reason ] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216238')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [string] + ${Reason}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterSharedVolume { + <# + .SYNOPSIS + Remove-ClusterSharedVolume [[-Name] ] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216239')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Remove-ClusterVMMonitoredItem { + <# + .SYNOPSIS + Remove-ClusterVMMonitoredItem [[-VirtualMachine] ] [-InputObject ] [-Service ] [-EventLog ] [-EventSource ] [-EventId ] [-Wait ] [-Cluster ] [] + +Remove-ClusterVMMonitoredItem [-InputObject ] [-Service ] [-EventLog ] [-EventSource ] [-EventId ] [-VMId ] [-Wait ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='VirtualMachine', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216240')] + param ( + [Parameter(ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [System.Collections.Specialized.StringCollection] + ${Service}, + + [string] + ${EventLog}, + + [string] + ${EventSource}, + + [int] + ${EventId}, + + [Parameter(ParameterSetName='VirtualMachine', Position=0)] + [Alias('VM')] + [ValidateNotNullOrEmpty()] + [string] + ${VirtualMachine}, + + [Parameter(ParameterSetName='VMId', ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [int] + ${Wait}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Rename-ClusterSharedVolume { + <# + .SYNOPSIS + Rename-ClusterSharedVolume [-Name] [[-VolumeName] ] -NewVolumeName [-NewVolumeGuid ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216242')] + param ( + [Parameter(Mandatory=$true, Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(Position=1)] + [string] + ${VolumeName}, + + [Parameter(ParameterSetName='NewVolumeName', Mandatory=$true)] + [string] + ${NewVolumeName}, + + [Parameter(ParameterSetName='NewVolumeName')] + [string] + ${NewVolumeGuid} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Reset-ClusterVMMonitoredState { + <# + .SYNOPSIS + Reset-ClusterVMMonitoredState [-Wait ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216243')] + param ( + [int] + ${Wait} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Resume-ClusterNode { + <# + .SYNOPSIS + Resume-ClusterNode [[-Name] ] [[-Failback] ] [-FailbackStorage] [-FailbackVMs] [-FailbackPinnedVMsOnly] [-Reason ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216244')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterNode])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(Position=1)] + [ValidateNotNullOrEmpty()] + [Microsoft.FailoverClusters.PowerShell.ResumeClusterNodeFailbackType] + ${Failback}, + + [switch] + ${FailbackStorage}, + + [switch] + ${FailbackVMs}, + + [switch] + ${FailbackPinnedVMsOnly}, + + [string] + ${Reason}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Resume-ClusterPhysicalDiskResource { + <# + .SYNOPSIS + Resume-ClusterPhysicalDiskResource [[-Name] ] [-RecoveryPassword ] [-RecoveryKeyPath ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216245')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [System.Collections.Specialized.StringCollection] + ${RecoveryPassword}, + + [System.Collections.Specialized.StringCollection] + ${RecoveryKeyPath}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Resume-ClusterResource { + <# + .SYNOPSIS + Resume-ClusterResource [[-Name] ] [-VolumeName ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216245')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [string] + ${VolumeName}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterBitLockerProtector { + <# + .SYNOPSIS + Set-ClusterBitLockerProtector [[-Name] ] [-ProtectorId ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216245')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [ValidateNotNullOrEmpty()] + [string] + ${ProtectorId}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterLog { + <# + .SYNOPSIS + Set-ClusterLog [-Size ] [-Level ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216246')] + [OutputType([Microsoft.FailoverClusters.PowerShell.Cluster])] + param ( + [int] + ${Size}, + + [int] + ${Level}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterOwnerNode { + <# + .SYNOPSIS + Set-ClusterOwnerNode -Owners [-Resource ] [-Group ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216247')] + param ( + [ValidateNotNullOrEmpty()] + [string] + ${Resource}, + + [ValidateNotNullOrEmpty()] + [string] + ${Group}, + + [Parameter(Mandatory=$true, ValueFromRemainingArguments=$true)] + [ValidateNotNull()] + [System.Collections.Specialized.StringCollection] + ${Owners}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterParameter { + <# + .SYNOPSIS + Set-ClusterParameter [-InputObject ] [-Create] [-Delete] [-Cluster ] [] + +Set-ClusterParameter [[-Name] ] [[-Value] ] [-InputObject ] [-Create] [-Delete] [-Cluster ] [] + +Set-ClusterParameter [[-Multiple] ] [-InputObject ] [-Create] [-Delete] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='NoMultiple', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216248')] + param ( + [Parameter(ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [Parameter(ParameterSetName='Single Parameter', Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(ParameterSetName='Multiple Parameter', Position=0)] + [ValidateNotNull()] + [hashtable] + ${Multiple}, + + [Parameter(ParameterSetName='Single Parameter', Position=1)] + [psobject] + ${Value}, + + [switch] + ${Create}, + + [switch] + ${Delete}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterQuorum { + <# + .SYNOPSIS + Set-ClusterQuorum [-DiskOnly ] [-NoWitness] [-DiskWitness ] [-FileShareWitness ] [-CloudWitness] [-AccountName ] [-Endpoint ] [-AccessKey ] [-SASToken ] [-ContainerName ] [-Credential ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216249')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterQuorumSettings])] + param ( + [ValidateNotNullOrEmpty()] + [string] + ${DiskOnly}, + + [Alias('NodeMajority')] + [switch] + ${NoWitness}, + + [Alias('NodeAndDiskMajority')] + [ValidateNotNullOrEmpty()] + [string] + ${DiskWitness}, + + [Alias('NodeAndFileShareMajority')] + [ValidateNotNullOrEmpty()] + [string] + ${FileShareWitness}, + + [switch] + ${CloudWitness}, + + [ValidateNotNullOrEmpty()] + [string] + ${AccountName}, + + [string] + ${Endpoint}, + + [ValidateNotNullOrEmpty()] + [string] + ${AccessKey}, + + [ValidateNotNullOrEmpty()] + [string] + ${SASToken}, + + [ValidateNotNullOrEmpty()] + [string] + ${ContainerName}, + + [pscredential] + ${Credential}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Set-ClusterResourceDependency { + <# + .SYNOPSIS + Set-ClusterResourceDependency [[-Resource] ] [[-Dependency] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216250')] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Resource}, + + [Parameter(Position=1)] + [string] + ${Dependency}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Show-ClusterExpectedNetworkTopology { + <# + .SYNOPSIS + Show-ClusterExpectedNetworkTopology [[-Node] ] [] + #> + + [CmdletBinding()] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Node} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Start-Cluster { + <# + .SYNOPSIS + Start-Cluster [[-Name] ] [-IgnorePersistentState] [-Wait ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216251')] + [OutputType([Microsoft.FailoverClusters.PowerShell.Cluster])] + param ( + [Parameter(Position=0)] + [Alias('Cluster')] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Alias('ips')] + [switch] + ${IgnorePersistentState}, + + [int] + ${Wait} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Start-ClusterGroup { + <# + .SYNOPSIS + Start-ClusterGroup [[-Name] ] [-IgnoreLocked] [-ChooseBestNode] [-IgnoreAffinityRule] [-Reason ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216252')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [switch] + ${IgnoreLocked}, + + [switch] + ${ChooseBestNode}, + + [switch] + ${IgnoreAffinityRule}, + + [string] + ${Reason}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Start-ClusterNode { + <# + .SYNOPSIS + Start-ClusterNode [[-Name] ] [-ForceQuorum] [-ClearQuarantine] [-IgnorePersistentState] [-PreventQuorum] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216253')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterNode])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(HelpMessage='Specifies if the cluster is in a force quorum state.')] + [Alias('fq','FixQuorum')] + [switch] + ${ForceQuorum}, + + [Parameter(HelpMessage='Specifies whether to clear quarantine state when starting the cluster node')] + [Alias('cq')] + [switch] + ${ClearQuarantine}, + + [Parameter(HelpMessage='Specifies whether the cluster will bring online groups that were online when the cluster was shut down.')] + [Alias('ips')] + [switch] + ${IgnorePersistentState}, + + [Alias('pq')] + [switch] + ${PreventQuorum}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Start-ClusterPhysicalDiskResource { + <# + .SYNOPSIS + Start-ClusterPhysicalDiskResource [[-Name] ] [-RecoveryPassword ] [-RecoveryKeyPath ] [-Reason ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216254')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [System.Collections.Specialized.StringCollection] + ${RecoveryPassword}, + + [System.Collections.Specialized.StringCollection] + ${RecoveryKeyPath}, + + [string] + ${Reason}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Start-ClusterResource { + <# + .SYNOPSIS + Start-ClusterResource [[-Name] ] [-IgnoreLocked] [-ChooseBestNode] [-IgnoreAffinityRule] [-Reason ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216254')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume])] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [switch] + ${IgnoreLocked}, + + [switch] + ${ChooseBestNode}, + + [switch] + ${IgnoreAffinityRule}, + + [string] + ${Reason}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Stop-Cluster { + <# + .SYNOPSIS + Stop-Cluster [[-Cluster] ] [-Force] [-Wait ] [-WhatIf] [-Confirm] [] + +Stop-Cluster [-Force] [-Wait ] [-InputObject ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='Cluster name', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216255')] + param ( + [Parameter(ParameterSetName='Cluster name', Position=0)] + [Alias('Name')] + [ValidateNotNullOrEmpty()] + [string] + ${Cluster}, + + [switch] + ${Force}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Stop-ClusterGroup { + <# + .SYNOPSIS + Stop-ClusterGroup [[-Name] ] [-IgnoreLocked] [-Reason ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216256')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterGroup])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [switch] + ${IgnoreLocked}, + + [string] + ${Reason}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Stop-ClusterNode { + <# + .SYNOPSIS + Stop-ClusterNode [[-Name] ] [-Wait ] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216257')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterNode])] + param ( + [Parameter(Position=0)] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Stop-ClusterResource { + <# + .SYNOPSIS + Stop-ClusterResource [[-Name] ] [-IgnoreLocked] [-Reason ] [-Wait ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216258')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume])] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [switch] + ${IgnoreLocked}, + + [string] + ${Reason}, + + [int] + ${Wait}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Suspend-ClusterNode { + <# + .SYNOPSIS + Suspend-ClusterNode [[-Name] ] [[-TargetNode] ] [-Drain] [-ForceDrain] [-RetryDrainOnFailure] [-AvoidPlacement] [-Wait] [-Reason ] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216259')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterNode])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [switch] + ${Drain}, + + [switch] + ${ForceDrain}, + + [switch] + ${RetryDrainOnFailure}, + + [switch] + ${AvoidPlacement}, + + [switch] + ${Wait}, + + [Parameter(Position=1)] + [ValidateNotNullOrEmpty()] + [string] + ${TargetNode}, + + [string] + ${Reason}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Suspend-ClusterPhysicalDiskResource { + <# + .SYNOPSIS + Suspend-ClusterPhysicalDiskResource [[-Name] ] [-CleanupClusterProtector] [-Force] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216260')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [switch] + ${CleanupClusterProtector}, + + [switch] + ${Force}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Suspend-ClusterResource { + <# + .SYNOPSIS + Suspend-ClusterResource [[-Name] ] [-VolumeName ] [-RedirectedAccess] [-Force] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216260')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume])] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [string] + ${VolumeName}, + + [Alias('FileSystemRedirectedAccess')] + [switch] + ${RedirectedAccess}, + + [switch] + ${Force}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Test-Cluster { + <# + .SYNOPSIS + Test-Cluster [[-Node] ] [-Disk ] [-Pool ] [-ReportName ] [-List] [-Include ] [-Ignore ] [-Force] [-KeepLocalStoragePoolsOnline] [-InputObject ] [-Cluster ] [-WhatIf] [-Confirm] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', SupportsShouldProcess=$true, ConfirmImpact='Medium', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216261')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterTestInfo])] + [OutputType([System.IO.FileInfo])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Node}, + + [ValidateNotNullOrEmpty()] + [System.Object[]] + ${Disk}, + + [ValidateNotNullOrEmpty()] + [System.Object[]] + ${Pool}, + + [ValidateNotNullOrEmpty()] + [string] + ${ReportName}, + + [switch] + ${List}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Include}, + + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Ignore}, + + [switch] + ${Force}, + + [switch] + ${KeepLocalStoragePoolsOnline}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Test-ClusterResourceFailure { + <# + .SYNOPSIS + Test-ClusterResourceFailure [[-Name] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216262')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterSharedVolume])] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Update-ClusterFunctionalLevel { + <# + .SYNOPSIS + Update-ClusterFunctionalLevel [-Force] [-WhatIf] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject')] + [OutputType([Microsoft.FailoverClusters.PowerShell.Cluster])] + param ( + [switch] + ${Force}, + + [switch] + ${WhatIf}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Update-ClusterIPResource { + <# + .SYNOPSIS + Update-ClusterIPResource [[-Name] ] [-Renew] [-Release] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216264')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [switch] + ${Renew}, + + [switch] + ${Release}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Update-ClusterNetworkNameResource { + <# + .SYNOPSIS + Update-ClusterNetworkNameResource [[-Name] ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(DefaultParameterSetName='InputObject', HelpUri='https://go.microsoft.com/fwlink/?LinkId=216265')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [System.Collections.Specialized.StringCollection] + ${Name}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +} + +function Update-ClusterVirtualMachineConfiguration { + <# + .SYNOPSIS + Update-ClusterVirtualMachineConfiguration [[-Name] ] [-VMId ] [-InputObject ] [-Cluster ] [] + #> + + [CmdletBinding(HelpUri='https://go.microsoft.com/fwlink/?LinkId=216266')] + [OutputType([Microsoft.FailoverClusters.PowerShell.ClusterResource])] + param ( + [Parameter(Position=0)] + [ValidateNotNullOrEmpty()] + [string] + ${Name}, + + [Parameter(ValueFromPipelineByPropertyName=$true)] + [guid] + ${VMId}, + + [Parameter(ParameterSetName='InputObject', ValueFromPipeline=$true)] + [ValidateNotNull()] + [psobject] + ${InputObject}, + + [ValidateNotNullOrEmpty()] + [string] + ${Cluster} + ) + end { + throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand + } +}