< Back

Remove-GcsBucket

Mon Jan 13, 2020 11:42 pm

NAME Remove-GcsBucket



SYNOPSIS

Deletes a Google Cloud Storage Bucket.





SYNTAX

Remove-GcsBucket [-Name] <string> [-Force <SwitchParameter>] [<CommonParameters>]





DESCRIPTION

Deletes a Google Cloud Storage Bucket.





PARAMETERS

-Name <string>

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



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Force <SwitchParameter>

When deleting a bucket with objects still inside, use Force to proceed with the deletion without a prompt.



Required? false

Position? named

Default value False

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 bucket to remove. This parameter will also accept a Bucket object.





OUTPUTS



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



PS C:\\> Remove-GcsBucket "unique-bucket-name"



Deletes the bucket "unique-bucket-name"

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



PS C:\\> Get-GcsBucket "bucket-with-files" | Remove-GcsBucket -Force



Forces the deletion of "bucket-with-files, despite the bucket containing objects.

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



PS C:\\> Remove-GcsBucket prod-database -WhatIf

What if: Performing the operation "Delete Bucket" on target "prod-database".



Prints what would happen if trying to delete bucket "prod-database".



RELATED LINKS