< Back

Test-GcsBucket

Mon Jan 13, 2020 11:55 pm

NAME Test-GcsBucket



SYNOPSIS

Tests if a bucket with the given name already exists.





SYNTAX

Test-GcsBucket [-Name] <string> [<CommonParameters>]





DESCRIPTION

Tests if a bucket with the given name already exists. Returns true if such a bucket already exists.





PARAMETERS

-Name <string>

The name of the bucket to test for. This parameter will also accept a Bucket object.



Required? true

Position? 0

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

System.Boolean





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



PS C:\\> Test-GcsBucket "bucket-name"

True



Tests that a bucket named "bucket-name" does exist. A new bucket with this name may not be created.

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



PS C:\\> Test-GcsBucket "foo"



Check if bucket "foo" exists.



RELATED LINKS