Logo

Documentation home for Transend tools

Export-M365SharedDrives

SYNOPSIS

Exports shared drives from a Microsoft 365 tenant.

SYNTAX

Help (Default)

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

Action

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

DESCRIPTION

Use the Export-M365SharedDrives cmdlet to export shared drives from a Microsoft 365 tenant.

See the Notes section for cmdlet requirements.

EXAMPLES

Example 1: Export raw data

Export-M365SharedDrives -ConfigNode Source -Format Csv >'shared_drives.csv'

This example exports all shared drives from a Microsoft 365 tenant. The exported data is formatted as CSV and saved to the file shared_drives.csv.

Example 2: Map data for Google Workspace

Export-M365SharedDrives -ConfigNode Source -Target Google -Format Csv >'shared_drives.csv'

This example exports all shared drives from a Microsoft 365 tenant. The exported data is formatted as CSV, mapped for import into Google Workspace, and saved to the file shared_drives.csv.

Example 3: Map data for Microsoft 365

Export-M365SharedDrives -ConfigNode Source -Target M365 -Format Csv >'shared_drives.csv'

This example exports all shared drives from a Microsoft 365 tenant. The exported data is formatted as CSV, mapped for import into Microsoft 365, and saved to the file shared_drives.csv.

Example 4: Map data for a migration list

Export-M365SharedDrives -ConfigNode Source -Target MigrationList -Format Csv >'shared_drives.csv'

This example exports all shared drives from a Microsoft 365 tenant. The exported data is formatted as CSV, mapped for use as a migration list, and saved to the file shared_drives.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: Google, M365, MigrationList, 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 PowerShell modules

  • ExchangeOnlineManagement
  • Microsoft.Online.SharePoint.PowerShell

Note that you must install the SharePoint module using Windows PowerShell (PowerShell 5.1 or earlier) even though you need to run Import-M365SharedDrives using PowerShell 7.0 or later.

Required config.psd1 configurations

  • M365ClientId
  • M365ClientSecret
  • M365SharePointDomain
  • M365Tenant

Optional config.psd1 configurations

  • M365CloudEnvironment

Required APIs

  • Microsoft Graph

Required scopes

  • Directory.Read.All (Application)
  • Sites.Read.All (Application)

TMCTools configuration options