< Back
Get-GceInstance
Post
NAME Get-GceInstance
SYNOPSIS
Gets information about one or more Google Compute Engine VM instances.
SYNTAX
Get-GceInstance [-Project <string>] [-SerialPortOutput <SwitchParameter>] [-PortNumber <int>] [<CommonParameters>]
Get-GceInstance [-Project <string>] -Zone <string> [-SerialPortOutput <SwitchParameter>] [-PortNumber <int>]
[<CommonParameters>]
Get-GceInstance [-Project <string>] [-Zone <string>] [-Name] <string> [-SerialPortOutput <SwitchParameter>]
[-PortNumber <int>] [<CommonParameters>]
Get-GceInstance [-Project <string>] [-Zone <string>] -ManagedGroupName <string> [-SerialPortOutput
<SwitchParameter>] [-PortNumber <int>] [<CommonParameters>]
Get-GceInstance [-Object] <Instance> [-SerialPortOutput <SwitchParameter>] [-PortNumber <int>] [<CommonParameters>]
Get-GceInstance [-ManagedGroupObject] <InstanceGroupManager> [-SerialPortOutput <SwitchParameter>] [-PortNumber
<int>] [<CommonParameters>]
DESCRIPTION
Gets information about all Google Compute Engine VM instances. Can get all instances of a project, or all
instances in a zone, or a specific instance by name. Can also get all instances of a managed instance group.
PARAMETERS
-Project <string>
The project that owns the instances.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Zone <string>
The zone in which the instance resides.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <string>
The name of the instance.
Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Object <Instance>
The Instance object to get a new copy of.
Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-ManagedGroupName <string>
The name of the instance group manager to get the instances of.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ManagedGroupObject <InstanceGroupManager>
The InstanceGroupManager object to get the instances of.
Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-SerialPortOutput <SwitchParameter>
When this switch is set, the cmdlet will output the string contents of the serial port of the instance rather
than the normal data about the instance.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-PortNumber <int>
The number of the serial port to read from. Defaults to 1. Has no effect if -SerialPortOutput is not set. Must
be between 1 and 4, inclusive.
Required? false
Position? named
Default value 1
Accept pipeline input? false
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
System.String
The name of the instance.
Google.Apis.Compute.v1.Data.Instance
The Instance object to get a new copy of.
Google.Apis.Compute.v1.Data.InstanceGroupManager
The InstanceGroupManager object to get the instances of.
OUTPUTS
Google.Apis.Compute.v1.Data.Instance
System.String
---------- EXAMPLE 1 ----------
PS C:\\> Get-GceInstance -Project "my-project"
Gets all instances of the project "my-project".
---------- EXAMPLE 2 ----------
PS C:\\> Get-GceInstance -Zone "us-west1-a"
Gets all instances in the zone "us-west1-a" in the default project.
---------- EXAMPLE 3 ----------
PS C:\\> Get-GceInstance "my-instance"
Gets the instance named "my-instance" in the default project and zone
---------- EXAMPLE 4 ----------
PS C:\\> Get-GceInstance -ManagedGroupName "my-group"
Gets all instances that are members of the managed instance group named "my-group".
---------- EXAMPLE 5 ----------
PS C:\\> Get-GceInstance "my-instance" -SerialPortOutput -Port 4.
Returns the data from serial port 4 of "my-instance".
RELATED LINKS
[Instance resource definition] (https://cloud.google.com/compute/docs/r ... s#resource)
SYNOPSIS
Gets information about one or more Google Compute Engine VM instances.
SYNTAX
Get-GceInstance [-Project <string>] [-SerialPortOutput <SwitchParameter>] [-PortNumber <int>] [<CommonParameters>]
Get-GceInstance [-Project <string>] -Zone <string> [-SerialPortOutput <SwitchParameter>] [-PortNumber <int>]
[<CommonParameters>]
Get-GceInstance [-Project <string>] [-Zone <string>] [-Name] <string> [-SerialPortOutput <SwitchParameter>]
[-PortNumber <int>] [<CommonParameters>]
Get-GceInstance [-Project <string>] [-Zone <string>] -ManagedGroupName <string> [-SerialPortOutput
<SwitchParameter>] [-PortNumber <int>] [<CommonParameters>]
Get-GceInstance [-Object] <Instance> [-SerialPortOutput <SwitchParameter>] [-PortNumber <int>] [<CommonParameters>]
Get-GceInstance [-ManagedGroupObject] <InstanceGroupManager> [-SerialPortOutput <SwitchParameter>] [-PortNumber
<int>] [<CommonParameters>]
DESCRIPTION
Gets information about all Google Compute Engine VM instances. Can get all instances of a project, or all
instances in a zone, or a specific instance by name. Can also get all instances of a managed instance group.
PARAMETERS
-Project <string>
The project that owns the instances.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Zone <string>
The zone in which the instance resides.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Name <string>
The name of the instance.
Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Object <Instance>
The Instance object to get a new copy of.
Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-ManagedGroupName <string>
The name of the instance group manager to get the instances of.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ManagedGroupObject <InstanceGroupManager>
The InstanceGroupManager object to get the instances of.
Required? true
Position? 0
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-SerialPortOutput <SwitchParameter>
When this switch is set, the cmdlet will output the string contents of the serial port of the instance rather
than the normal data about the instance.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-PortNumber <int>
The number of the serial port to read from. Defaults to 1. Has no effect if -SerialPortOutput is not set. Must
be between 1 and 4, inclusive.
Required? false
Position? named
Default value 1
Accept pipeline input? false
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
System.String
The name of the instance.
Google.Apis.Compute.v1.Data.Instance
The Instance object to get a new copy of.
Google.Apis.Compute.v1.Data.InstanceGroupManager
The InstanceGroupManager object to get the instances of.
OUTPUTS
Google.Apis.Compute.v1.Data.Instance
System.String
---------- EXAMPLE 1 ----------
PS C:\\> Get-GceInstance -Project "my-project"
Gets all instances of the project "my-project".
---------- EXAMPLE 2 ----------
PS C:\\> Get-GceInstance -Zone "us-west1-a"
Gets all instances in the zone "us-west1-a" in the default project.
---------- EXAMPLE 3 ----------
PS C:\\> Get-GceInstance "my-instance"
Gets the instance named "my-instance" in the default project and zone
---------- EXAMPLE 4 ----------
PS C:\\> Get-GceInstance -ManagedGroupName "my-group"
Gets all instances that are members of the managed instance group named "my-group".
---------- EXAMPLE 5 ----------
PS C:\\> Get-GceInstance "my-instance" -SerialPortOutput -Port 4.
Returns the data from serial port 4 of "my-instance".
RELATED LINKS
[Instance resource definition] (https://cloud.google.com/compute/docs/r ... s#resource)