But when I specify the name of a specific managed instance group, I get an error specifying that the -Zone must be specified:
Get-GceManagedInstanceGroup -Name "my-mig"
Get-GceManagedInstanceGroup : Parameter Zone was not set and does not have a default value.
At line:1 char:1
+ Get-GceManagedInstanceGroup -Name my-mig
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-GceManagedInstanceGroup], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Google.PowerShell.Compute.GetManagedInstanceGroupCmdlet
And when I add the -Zone, I get an error saying that I also must specify -Region:
Get-GceManagedInstanceGroup : Parameter Region was not set and does not have a default value.
At line:1 char:1
+ Get-GceManagedInstanceGroup -Name "my-mig" -Zone "us-west1-a"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-GceManagedInstanceGroup], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,Google.PowerShell.Compute.GetManagedInstanceGroupCmdlet
Then, when I specify both -Zone and -Region, I get an error saying that I can't use -Zone and -Region together with -Name:
I am trying to run
Get-GceManagedInstanceGroup
for a specific managed instance group on a Windows managed instance in GCP.When I run just the command, it executes fine, but outputs all managed instance groups:
But when I specify the name of a specific managed instance group, I get an error specifying that the
-Zone
must be specified:And when I add the
-Zone
, I get an error saying that I also must specify-Region
:Then, when I specify both
-Zone
and-Region
, I get an error saying that I can't use-Zone
and-Region
together with-Name
:And when I leave out the
-Name
and only specify-Zone
and-Region
, I am prompted to specify the Name:On my own laptop I am able to run the command
Get-GceManagedInstanceGroup -Name "my-mig" -Zone "us-west1-a"
successfully for zonal MIGs.