< Back

Remove-GoogleDirectoryOU

Mon Jan 13, 2020 10:49 pm

NAME Remove-GoogleDirectoryOU



SYNOPSIS

Delets a GSuite organizational unit.





SYNTAX

Remove-GoogleDirectoryOU [-OrgUnitPath] <String> [-CustomerId <String>] -BearerToken <String> [-Force] [-WhatIf]

[-Confirm] [<CommonParameters>]



Remove-GoogleDirectoryOU [-OrgUnitPath] <String> [-CustomerId <String>] [-ProfileLocation <String>] [-Persist]

[-Force] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

This cmdlet deletes an orgaizational unit. You can only delete organizational units

that do not have any child organizational units or any users assigned to them. You

need to reassign users to other organizational units and remove any child organizational

units before deleting.





PARAMETERS

-OrgUnitPath <String>

The path to the organizational unit to delete.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-CustomerId <String>

If you are an administrator deleting an organizational unit, use my_customer. This is the default. If you

are reseller deleting an organizational unit for a resold customer, use customerId. To retrieve the

customerId, use the Retrieve a user operation.



Required? false

Position? named

Default value my_customer

Accept pipeline input? false

Accept wildcard characters? false



-BearerToken <String>

The bearer token to use to authenticate the request.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ProfileLocation <String>

The location where stored credentials are located. If this is not specified, the default location will be used.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Persist [<SwitchParameter>]

Indicates that the newly retrieved token(s) or refreshed token and associated client data like client secret

are persisted to disk.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Force [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



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

System.String





OUTPUTS

None





NOTES





AUTHOR: Michael Haken

LAST UPDATE: 2/12/2018



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



PS C:\\>Remove-GoogleDirectoryOU -OrgUnitPath "/my_org/business/sales" -Force -ClientId $Id -Persist -UseCompression



This examples deletes the 'sales' OU and bypasses confirmation.











RELATED LINKS