Exports shared drives from a Microsoft 365 tenant.
Export-M365SharedDrives
[-ShowPrereqs]
[<CommonParameters>]
Export-M365SharedDrives
-ConfigNode <String>
[-Target <String>]
[-Format <String>]
[<CommonParameters>]
Use the Export-M365SharedDrives cmdlet to export shared drives
from a Microsoft 365 tenant.
Shared drives from archived sites are not supported.
See the Notes section for cmdlet requirements.
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.
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.
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.
Export-M365SharedDrives -ConfigNode Source -Target TMC -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.
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
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
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
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, TMC, None
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Required config.psd1 keys
These configuration keys are scoped to the Source or Target node in config.psd1.
M365ClientId: The client ID of your tenant’s app.
M365ClientSecret: The client secret of your tenant’s app.
M365SharePointDomain: The name of your SharePoint domain. For example, source.
M365Tenant: The ID of your tenant. For example, source.org.
Optional config.psd1 keys
These configuration keys are scoped to the Source or Target node in config.psd1.
M365GetSharedDriveDelegatesFromSite : Determines how shared drive delegates are retrieved. When set to $false,
delegates are retrieved from the document library. With this option, only FullAccess delegates are surfaced by the
underlying API. When set to $true, delegates are retrieved from the owning site. With this option, all supported
delegate types are retrieved, but they may not accurately reflect membership at the document library level in the case
where inheritance has been overridden.
Default: $false
M365ClientCertificate: The path to the certificate file associated with your tenant’s app.
Default $env:ProgramData\Transend\tools\TMCTools.pfx
M365CloudEnvironment: The cloud environment for your tenant. Allowed values are Global, China (.cn),
Germany (.de) and USGovernment (.us).
Default: Global
Required PowerShell modules
ExchangeOnlineManagementPnP.PowerShellRequired APIs
Microsoft GraphOffice 365 Exchange OnlineSharePointRequired Microsoft Graph Application scopes
Calendars.ReadWriteDirectory.ReadWrite.AllSites.Manage.AllTeamSettings.ReadWrite.AllRequired Office 365 Exchange Online Application scopes
Exchange.ManageAsAppRequired SharePoint Application Scopes
Sites.FullControl.All