< Back
Get-ODItem
Post
NAME Get-ODItem
SYNOPSIS
SYNTAX
Get-ODItem [-AccessToken] <String> [[-ResourceId] <String>] [[-Path] <String>] [[-ElementId] <String>] [[-DriveId]
<String>] [[-LocalPath] <String>] [[-LocalFileName] <String>] [<CommonParameters>]
DESCRIPTION
Download an item/file. Warning: A local file will be overwritten.
PARAMETERS
-AccessToken <String>
A valid access token for bearer authorization.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ResourceId <String>
Mandatory for OneDrive 4 Business access. Is the ressource URI: "https://<tenant>-my.sharepoint.com/".
Example: "https://sepagogmbh-my.sharepoint.com/"
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
Specifies the path of the file to download.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ElementId <String>
Specifies the element id of the file to download. If Path and ElementId are given, the ElementId is used with
a warning.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DriveId <String>
Specifies the OneDrive drive id. If not set, the default drive is used.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LocalPath <String>
Save file to path (if not given, the current local path is used).
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LocalFileName <String>
Local filename. If not given, the file name of OneDrive is used.
Required? false
Position? 7
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
OUTPUTS
NOTES
Author: Marcel Meurer, marcel.meurer@sepago.de, Twitter: MarcelMeurer
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-ODItem -AccessToken $AuthToken -Path "/Data/documents/2016/Powershell array custom objects.docx"
Downloads a file from OneDrive
RELATED LINKS
SYNOPSIS
SYNTAX
Get-ODItem [-AccessToken] <String> [[-ResourceId] <String>] [[-Path] <String>] [[-ElementId] <String>] [[-DriveId]
<String>] [[-LocalPath] <String>] [[-LocalFileName] <String>] [<CommonParameters>]
DESCRIPTION
Download an item/file. Warning: A local file will be overwritten.
PARAMETERS
-AccessToken <String>
A valid access token for bearer authorization.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ResourceId <String>
Mandatory for OneDrive 4 Business access. Is the ressource URI: "https://<tenant>-my.sharepoint.com/".
Example: "https://sepagogmbh-my.sharepoint.com/"
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
Specifies the path of the file to download.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ElementId <String>
Specifies the element id of the file to download. If Path and ElementId are given, the ElementId is used with
a warning.
Required? false
Position? 4
Default value
Accept pipeline input? false
Accept wildcard characters? false
-DriveId <String>
Specifies the OneDrive drive id. If not set, the default drive is used.
Required? false
Position? 5
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LocalPath <String>
Save file to path (if not given, the current local path is used).
Required? false
Position? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-LocalFileName <String>
Local filename. If not given, the file name of OneDrive is used.
Required? false
Position? 7
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
OUTPUTS
NOTES
Author: Marcel Meurer, marcel.meurer@sepago.de, Twitter: MarcelMeurer
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-ODItem -AccessToken $AuthToken -Path "/Data/documents/2016/Powershell array custom objects.docx"
Downloads a file from OneDrive
RELATED LINKS