< Back
Get-ODChildItems
Post
NAME Get-ODChildItems
SYNOPSIS
SYNTAX
Get-ODChildItems [-AccessToken] <String> [[-ResourceId] <String>] [[-Path] <String>] [[-ElementId] <String>]
[[-SelectProperties] <String>] [[-DriveId] <String>] [-ItemPropertyMode] [[-SearchText] <String>] [-Loop]
[<CommonParameters>]
DESCRIPTION
Get child items of a path. Return count is not limited.
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 elements to be listed. If not given, the path is "/".
Required? false
Position? 3
Default value /
Accept pipeline input? false
Accept wildcard characters? false
-ElementId <String>
Specifies the id of an element. 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
-SelectProperties <String>
Specifies a comma-separated list of the properties to be returned for file and folder objects (case
sensitive). If not set, name, size, lastModifiedDateTime and id are used. (See
https://dev.onedrive.com/odata/optional ... meters.htm).
If you use -SelectProperties "", all properties are listed. Warning: A complex "content.downloadUrl" is
listed/generated for download files without authentication for several hours.
Required? false
Position? 5
Default value name,size,lastModifiedDateTime,id
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? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ItemPropertyMode [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-SearchText <String>
Required? false
Position? 7
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Loop [<SwitchParameter>]
Required? false
Position? named
Default value False
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-ODChildItems -AccessToken $AuthToken -Path "/" | ft
Lists files and folders in your OneDrives root folder and displays name, size, lastModifiedDateTime, id and folder
property as a table
Get-ODChildItems -AccessToken $AuthToken -Path "/" -SelectProperties ""
Lists files and folders in your OneDrives root folder and displays all properties
RELATED LINKS
SYNOPSIS
SYNTAX
Get-ODChildItems [-AccessToken] <String> [[-ResourceId] <String>] [[-Path] <String>] [[-ElementId] <String>]
[[-SelectProperties] <String>] [[-DriveId] <String>] [-ItemPropertyMode] [[-SearchText] <String>] [-Loop]
[<CommonParameters>]
DESCRIPTION
Get child items of a path. Return count is not limited.
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 elements to be listed. If not given, the path is "/".
Required? false
Position? 3
Default value /
Accept pipeline input? false
Accept wildcard characters? false
-ElementId <String>
Specifies the id of an element. 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
-SelectProperties <String>
Specifies a comma-separated list of the properties to be returned for file and folder objects (case
sensitive). If not set, name, size, lastModifiedDateTime and id are used. (See
https://dev.onedrive.com/odata/optional ... meters.htm).
If you use -SelectProperties "", all properties are listed. Warning: A complex "content.downloadUrl" is
listed/generated for download files without authentication for several hours.
Required? false
Position? 5
Default value name,size,lastModifiedDateTime,id
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? 6
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ItemPropertyMode [<SwitchParameter>]
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-SearchText <String>
Required? false
Position? 7
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Loop [<SwitchParameter>]
Required? false
Position? named
Default value False
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-ODChildItems -AccessToken $AuthToken -Path "/" | ft
Lists files and folders in your OneDrives root folder and displays name, size, lastModifiedDateTime, id and folder
property as a table
Get-ODChildItems -AccessToken $AuthToken -Path "/" -SelectProperties ""
Lists files and folders in your OneDrives root folder and displays all properties
RELATED LINKS