< Back

Add-GceManagedInstanceGroup

Mon Jan 13, 2020 11:00 pm

NAME Add-GceManagedInstanceGroup



SYNOPSIS

Creates a new Google Compute Engine instance group manager.





SYNTAX

Add-GceManagedInstanceGroup [-Project <string>] [-Zone <string>] [-Name] <string> [-InstanceTemplate] <string>

[-TargetSize] <int> [-BaseInstanceName <string>] [-Description <string>] [-TargetPool <string[]>] [-PortName

<string[]>] [-PortNumber <int[]>] [-NamedPort <NamedPort[]>] [<CommonParameters>]



Add-GceManagedInstanceGroup [-Project <string>] [-Zone <string>] [-Region <string>] [-Object]

<InstanceGroupManager> [<CommonParameters>]



Add-GceManagedInstanceGroup [-Project <string>] [-Region <string>] [-Name] <string> [-InstanceTemplate] <string>

[-TargetSize] <int> [-BaseInstanceName <string>] [-Description <string>] [-TargetPool <string[]>] [-PortName

<string[]>] [-PortNumber <int[]>] [-NamedPort <NamedPort[]>] [<CommonParameters>]





DESCRIPTION

Creates a new Google Compute Engine instance group manager.





PARAMETERS

-Project <string>

The project that will own the instance group.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Zone <string>

The zone where the instance gorup will live.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Region <string>

The region where the instance gorup will live.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string>

The name of the instance group.



Required? true

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-InstanceTemplate <string>

The instance template to use when creating instances. Can be a string URL to a template, or an

InstanceTemplate object from Get-GceInstanceTemplate.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-TargetSize <int>

The target number of instances for this instance group to have.



Required? true

Position? 2

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-BaseInstanceName <string>

The base instance name for this group. Instances will take this name and append a hypen and a random four

character string. Defaults to the group name.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Description <string>

The human readable description of this instance group.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-TargetPool <string[]>

The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target

pools automatically apply to all of the instances in the managed instance group.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PortName <string[]>

The name you want to give to a port. Must have the same number of elements as PortNumber.



Required? false

Position? named

Default value System.String[]

Accept pipeline input? false

Accept wildcard characters? false



-PortNumber <int[]>

The number of the port you want to give a name. Must have the same number of elements as PortName.



Required? false

Position? named

Default value System.Int32[]

Accept pipeline input? false

Accept wildcard characters? false



-NamedPort <NamedPort[]>

A NamedPort object you want to include in the list of named ports.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Object <InstanceGroupManager>

An InstanceGroupManager object used to create a new managed instance group.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Google.Apis.Compute.v1.Data.InstanceGroupManager

An InstanceGroupManager object used to create a new managed instance group.





OUTPUTS

Google.Apis.Compute.v1.Data.InstanceGroupManager





---------- EXAMPLE 1 ----------



PS C:\\> $template = Get-GceInstanceTemplate "my-template"

PS C:\\> Add-GceManagedInstanceGroup "my-instance-group" $template 4



Creates a new managed instance group named "my-instance-group". The instance of the group will be created from

template "my-template" and the group will create four instances.



RELATED LINKS

[Managed Instance Group resource definition]

(https://cloud.google.com/compute/docs/r ... s#resource)