From e29fabd225b9dc34282774ff7e57ddc93bc5ab8a Mon Sep 17 00:00:00 2001 From: Matthew Bratschun <25390936+mbrat2005@users.noreply.github.com> Date: Wed, 18 Oct 2023 15:46:39 -0600 Subject: [PATCH] Enable ByNode ParameterSet in New-Fleet Added ability to pass a list of nodes in the -Node parameter to the New-Fleet function. The use case is to create separate fleets for each site in a stretched cluster. --- Frameworks/VMFleet/VMFleet.psm1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Frameworks/VMFleet/VMFleet.psm1 b/Frameworks/VMFleet/VMFleet.psm1 index 263a5ad..a1cd6ac 100644 --- a/Frameworks/VMFleet/VMFleet.psm1 +++ b/Frameworks/VMFleet/VMFleet.psm1 @@ -2174,6 +2174,7 @@ function New-Fleet switch ($psCmdlet.ParameterSetName) { "ByCluster" { $Nodes = @(Get-ClusterNode @clusterParam) } + "ByNode" { $Nodes = @(Get-ClusterNode -Name $node) } } # convert to fixed vhd(x) if needed @@ -8585,4 +8586,4 @@ function SetCacheBehavior Remove-PSSession -Session $s } } -} \ No newline at end of file +}