< Back

Stop-GceInstance

Mon Jan 13, 2020 11:54 pm

NAME Stop-GceInstance



SYNOPSIS

Stops a Google Compute Engine VM instance.





SYNTAX

Stop-GceInstance [-Project <string>] [-Zone <string>] [-Name] <string> [<CommonParameters>]



Stop-GceInstance [-Object] <Instance> [<CommonParameters>]





DESCRIPTION

Stops a Google Compute Engine VM instance.





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? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string>

The name of the instance to stop.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Object <Instance>

The instance object to stop.



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

System.String

The name of the instance to stop.



Google.Apis.Compute.v1.Data.Instance

The instance object to stop.





OUTPUTS

Google.Apis.Compute.v1.Data.Instance





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



PS C:\\> Stop-GceInstance "my-instance"



Stops the instance named "my-instance" in the default project and zone.

---------- EXAMPLE 2 ----------



PS C:\\> Get-GceInstance -Project "my-project"|

where Status -eq Running |

Stop-GceInstance



Stops all instances in project "my-project" that are currently running.



RELATED LINKS

[Instance resource definition] (https://cloud.google.com/compute/docs/r ... s#resource)