< Back

Get-ODItemProperty

Sat Jan 18, 2020 6:04 pm

NAME Get-ODItemProperty



SYNOPSIS





SYNTAX

Get-ODItemProperty [-AccessToken] <String> [[-ResourceId] <String>] [[-Path] <String>] [[-ElementId] <String>]

[[-SelectProperties] <String>] [[-DriveId] <String>] [<CommonParameters>]





DESCRIPTION

Get the properties of an item (file or folder).





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 to the element/item. If not given, the properties of your default root drive are listed.



Required? false

Position? 3

Default value /

Accept pipeline input? false

Accept wildcard characters? false



-ElementId <String>

Specifies the id of the element/item. 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



<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-ODItemProperty -AccessToken $AuthToken -Path "/Data/documents/2016/AzureML with PowerShell.docx"



Get the default set of metadata for a file or folder (name, size, lastModifiedDateTime, id)



Get-ODItemProperty -AccessToken $AuthToken -ElementId 8BADCFF017EAA324!12169 -SelectProperties ""

Get all metadata of a file or folder by element id ("" select all properties)











RELATED LINKS





CommonParameters : False

WorkflowCommonParameters : False

details : @{name=Get-ODRootUri; noun=; verb=}

Syntax : @{syntaxItem=System.Object[]}

parameters : @{parameter=System.Object[]}

inputTypes : @{inputType=}

returnValues : @{returnValue=}

aliases : None



remarks : Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only

partial help.

-- To download and install Help files for the module that includes this cmdlet, use

Update-Help.

alertSet :

description :

examples :

Synopsis :

Get-ODRootUri [[-ResourceId] <string>]



ModuleName : OneDrive

nonTerminatingErrors :

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

Name : Get-ODRootUri

Category : Function

Component :

Role :

Functionality :