< Back

Get-GcpProject

Mon Jan 13, 2020 11:17 pm

NAME Get-GcpProject



SYNOPSIS

Retrieves one or more Google Cloud projects.





SYNTAX

Get-GcpProject [-Name <string>] [-ProjectId <string>] [-Label <Hashtable>] [<CommonParameters>]





DESCRIPTION

Retrieves one or more Google Cloud projects. The cmdlet will return all available projects if no parameter is

used. If -Name, -Id or -Label is used, the cmdlets will return the projects that match the given arguments.





PARAMETERS

-Name <string>

The name of the project to seach for. This parameter is case insensitive.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ProjectId <string>

The Id of the project to seach for. This parameter is case insensitive.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Label <Hashtable>

The labels of the project to seach for. Key and value of the label should be in lower case with no spaces in

them.



Required? false

Position? named

Default value

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



OUTPUTS



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



PS C:\\> Get-GcProject



This command gets all the available Google Cloud projects.

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



PS C:\\> Get-GcProject -Name "My Project"



This command gets the project that has the name "My Project".

---------- EXAMPLE 3 ----------



PS C:\\> Get-GcProject -Id "my-id"



This command gets the project that has the Id "my-id".

---------- EXAMPLE 4 ----------



PS C:\\> Get-GcProject -Label @{"environment" = "test"}



This command gets all the projects that has the label "environment" with value "test".



RELATED LINKS

[Projects]

(https://cloud.google.com/resource-manag ... m_projects)

[Labels] (https://cloud.google.com/resource-manag ... ing-labels)