Logo

Documentation home for Transend tools

Export-GODirectoryObjects

SYNOPSIS

Exports directory objects from a Google Workspace tenant.

SYNTAX

Help (Default)

Export-GODirectoryObjects [-ShowPrereqs] [<CommonParameters>]

Action

Export-GODirectoryObjects -ConfigNode <String> [-Target <String>] [-Format <String>]
 [<CommonParameters>]

DESCRIPTION

Use the Export-GODirectoryObjects cmdlet to export directory objects from a Google Workspace tenant. Because Google Workspace does not support listing directory objects from the tenant, the results are limited to cached objects.

See the Notes section for cmdlet requirements.

EXAMPLES

Example 1: Export raw data

Export-GODirectoryObjects -ConfigNode Source -Format Csv >'directory_objects.csv'

This example exports all directory objects from a Google Workspace tenant. The exported data is formatted as CSV and saved to the file directory_objects.csv.

PARAMETERS

-ConfigNode

The config.psd1 configuration node to use.

Type: String
Parameter Sets: Action
Aliases:
Accepted values: Source, Target

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Format

The output type for exported data.

Note that extended properties cannot be serialized into CSV format. When using -Format Csv, extended properties will display as System.Collections.Hashtable in the output.

Type: String
Parameter Sets: Action
Aliases:
Accepted values: Csv, Json, Objects

Required: False
Position: Named
Default value: Objects
Accept pipeline input: False
Accept wildcard characters: False

-ShowPrereqs

Prints the cmdlet prerequisites.

Type: SwitchParameter
Parameter Sets: Help
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Target

Specifies a mapping target for the exported data. Exported data mapped for a supported target is directly consumable by a corresponding import cmdlet.

To export unmapped data, use -Target None.

Type: String
Parameter Sets: Action
Aliases:
Accepted values: None

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object[]

NOTES

Required config.psd1 configurations

  • GOAdmin
  • GOServiceAccountKey
  • GOTenant

Required APIs

  • Admin SDK
  • Cloud Resource Manager
  • Contacts
  • Gmail
  • Google Calendar
  • Google Drive

Required scopes

  • https://www.googleapis.com/auth/admin.directory.domain.readonly
  • https://www.googleapis.com/auth/admin.directory.group.readonly
  • https://www.googleapis.com/auth/admin.directory.orgunit.readonly
  • https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly
  • https://www.googleapis.com/auth/admin.directory.user.readonly
  • https://www.googleapis.com/auth/calendar
  • https://www.googleapis.com/auth/calendar.readonly
  • https://www.googleapis.com/auth/cloudplatformprojects.readonly
  • https://www.googleapis.com/auth/contacts.readonly
  • https://www.googleapis.com/auth/directory.readonly
  • https://www.googleapis.com/auth/drive.readonly
  • https://www.googleapis.com/auth/gmail.readonly
  • https://www.googleapis.com/auth/userinfo.email

TMCTools configuration options