< Back

Remove-GceNetwork

Mon Jan 13, 2020 11:38 pm

NAME Remove-GceNetwork



SYNOPSIS

Removes Google Compute Engine networks.





SYNTAX

Remove-GceNetwork [-Project <string>] [-Name] <string[]> [<CommonParameters>]



Remove-GceNetwork [-InputObject] <Network[]> [<CommonParameters>]





DESCRIPTION

Removes one or more Google Compute Engine networks. Will raise errors if the networks do not exist. The cmdlet

will delete the networks in the default project if -Project is not used. The cmdlet accept either the names of the

networks or network objects. If network objects are used, network names and project names are extracted from the

objects.





PARAMETERS

-Project <string>

The project to remove the networks in. If not set via PowerShell parameter processing, will default to the

Cloud SDK's DefaultProject property.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Name <string[]>

The names of the networks to be removed.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Network <string[]>

The names of the networks to be removed.



This is an alias of the Name parameter.



Required? true

Position? 0

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-InputObject <Network[]>

The network objects to be removed. Network's name and project will be extracted from the object.



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 names of the networks to be removed.



Google.Apis.Compute.v1.Data.Network[]

The network objects to be removed. Network's name and project will be extracted from the object.





OUTPUTS



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



PS C:\\> Remove-GceNetwork -Network "my-network"



This command removes network "my-network" in the default project.

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



PS C:\\> Remove-GceNetwork -Network "my-network1", "my-network2" -Project "my-project"



This command removes 2 networks ("my-network1" and "my-network2") in the project "my-project".

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



PS C:\\> Get-GceNetwork "my-network1", "my-network2" | Remove-GceNetwork



This command removes networks "my-network1" and "my-network2" in the default project by piping the network object

to Remove-GceNetwork.



RELATED LINKS

[Networks] (https://cloud.google.com/compute/docs/vpc/)