-
Notifications
You must be signed in to change notification settings - Fork 10
New GDriveFileObj
Creates a new Drive API File object.
New-GDriveFileObj [[-AppProperties] <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[[-Capabilities] <CapabilitiesData>] [[-ContentHints] <ContentHintsData>] [[-CreatedTime] <DateTime>]
[[-Description] <String>] [[-ExplicitlyTrashed] <Boolean>] [[-FileExtension] <String>]
[[-FolderColorRgb] <String>] [[-FullFileExtension] <String>] [[-HeadRevisionId] <String>]
[[-IconLink] <String>] [[-Id] <String>] [[-ImageMediaMetadata] <ImageMediaMetadataData>]
[[-IsAppAuthorized] <Boolean>] [[-LastModifyingUser] <User>] [[-Md5Checksum] <String>] [[-MimeType] <String>]
[[-ModifiedByMeTime] <DateTime>] [[-ModifiedTime] <DateTime>] [[-Name] <String>]
[[-OriginalFilename] <String>] [[-OwnedByMe] <Boolean>] [[-Owners] <User[]>] [[-Parents] <String[]>]
[[-Permissions] <Permission[]>]
[[-Properties] <System.Collections.Generic.IDictionary`2[System.String,System.String]>]
[[-QuotaBytesUsed] <Int64>] [[-Shared] <Boolean>] [[-SharedWithMeTime] <DateTime>] [[-SharingUser] <User>]
[[-Size] <Int64>] [[-Spaces] <String[]>] [[-Starred] <Boolean>] [[-ThumbnailLink] <String>]
[[-Trashed] <Boolean>] [[-Version] <Int64>] [[-VideoMediaMetadata] <VideoMediaMetadataData>]
[[-ViewedByMe] <Boolean>] [[-ViewedByMeTime] <DateTime>] [[-ViewersCanCopyContent] <Boolean>]
[[-WebContentLink] <String>] [[-WebViewLink] <String>] [[-WritersCanShare] <Boolean>] [-WhatIf] [-Confirm]
This provides a Cmdlet-Based approach to creating a File object which may be required as a parameter for some other Cmdlets in the Drive API category.
You could alternately create this object by calling New-Object -TypeName Google.Apis.Drive.v3.Data.File
PS C:\> New-GDriveFileObj
This automatically generated example serves to show the bare minimum required to call this Cmdlet.
Additional examples may be added, viewed and edited by users on the community wiki at the URL found in the related links.
A collection of arbitrary key-value pairs which are private to the requesting app.Entries with null values are cleared in update and copy requests.
Type: System.Collections.Generic.IDictionary`2[System.String,System.String]
Parameter Sets: (All)
Aliases:
Required: False
Position: 0
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Capabilities the current user has on the file.
Type: CapabilitiesData
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Additional information about the content of the file. These fields are never populated in responses.
Type: ContentHintsData
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The time at which the file was created (RFC 3339 date-time).
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
A short description of the file.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The final component of fullFileExtension. This is only available for files with binary content in Drive.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.If an unsupported color is specified, the closest color in the palette will be used instead.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 7
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Drive.This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 8
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The ID of the file's head revision. This is currently only available for files with binary content in Drive.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 9
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
A static, unauthenticated link to the file's icon.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 10
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The ID of the file.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 11
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Additional metadata about image media, if available.
Type: ImageMediaMetadataData
Parameter Sets: (All)
Aliases:
Required: False
Position: 12
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Whether the file was created or opened by the requesting app.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 13
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The last user to modify the file.
Type: User
Parameter Sets: (All)
Aliases:
Required: False
Position: 14
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The MD5 checksum for the content of the file. This is only applicable to files with binary content in Drive.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 15
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The MIME type of the file.Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 16
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The last time the file was modified by the user (RFC 3339 date-time).
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 17
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The last time the file was modified by anyone (RFC 3339 date-time).Note that setting modifiedTime will also update modifiedByMeTime for the user.
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 18
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The name of the file. This is not necessarily unique within a folder.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 19
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Drive.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 20
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Whether the user owns the file.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 21
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The owners of the file. Currently, only certain legacy files may have more than one owner.
Type: User[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 22
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The IDs of the parent folders which contain the file.If not specified as part of a create request, the file will be placed directly in the My Drive folder. Update requests must use the addParents and removeParents parameters to modify the values.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 23
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The full list of permissions for the file. This is only available if the requesting user can share the file.
Type: Permission[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 24
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
A collection of arbitrary key-value pairs which are visible to all apps.Entries with null values are cleared in update and copy requests.
Type: System.Collections.Generic.IDictionary`2[System.String,System.String]
Parameter Sets: (All)
Aliases:
Required: False
Position: 25
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
Type: Int64
Parameter Sets: (All)
Aliases:
Required: False
Position: 26
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Whether the file has been shared.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 27
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 28
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The user who shared the file with the requesting user, if applicable.
Type: User
Parameter Sets: (All)
Aliases:
Required: False
Position: 29
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The size of the file's content in bytes. This is only applicable to files with binary content in Drive.
Type: Int64
Parameter Sets: (All)
Aliases:
Required: False
Position: 30
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: 31
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Whether the user has starred the file.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 32
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 33
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 34
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
Type: Int64
Parameter Sets: (All)
Aliases:
Required: False
Position: 35
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Additional metadata about video media. This may not be available immediately upon upload.
Type: VideoMediaMetadataData
Parameter Sets: (All)
Aliases:
Required: False
Position: 36
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Whether the file has been viewed by this user.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 37
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The last time the file was viewed by the user (RFC 3339 date-time).
Type: DateTime
Parameter Sets: (All)
Aliases:
Required: False
Position: 38
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Whether users with only reader or commenter permission can copy the file's content. This affects copy, download, and print operations.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 39
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
A link for downloading the content of the file in a browser. This is only available for files with binary content in Drive.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 40
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
A link for opening the file in a relevant Google editor or viewer in a browser.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 41
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Whether users with only writer permission can modify the file's permissions.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 42
Default value:
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
System.Collections.Generic.IDictionary`2System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
A collection of arbitrary key-value pairs which are private to the requesting app.Entries with null values are cleared in update and copy requests.
Capabilities the current user has on the file.
Additional information about the content of the file. These fields are never populated in responses.
The time at which the file was created (RFC 3339 date-time).
A short description of the file.
Whether the file has been explicitly trashed, as opposed to recursively trashed from a parent folder.
The final component of fullFileExtension. This is only available for files with binary content in Drive.
The color for a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.If an unsupported color is specified, the closest color in the palette will be used instead.
The full file extension extracted from the name field. May contain multiple concatenated extensions, such as "tar.gz". This is only available for files with binary content in Drive.This is automatically updated when the name field changes, however it is not cleared if the new name does not contain a valid extension.
The ID of the file's head revision. This is currently only available for files with binary content in Drive.
A static, unauthenticated link to the file's icon.
The ID of the file.
Additional metadata about image media, if available.
Whether the file was created or opened by the requesting app.
The last user to modify the file.
The MD5 checksum for the content of the file. This is only applicable to files with binary content in Drive.
The MIME type of the file.Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource.
The last time the file was modified by the user (RFC 3339 date-time).
The last time the file was modified by anyone (RFC 3339 date-time).Note that setting modifiedTime will also update modifiedByMeTime for the user.
The name of the file. This is not necessarily unique within a folder.
The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Drive.
Whether the user owns the file.
The owners of the file. Currently, only certain legacy files may have more than one owner.
The IDs of the parent folders which contain the file.If not specified as part of a create request, the file will be placed directly in the My Drive folder. Update requests must use the addParents and removeParents parameters to modify the values.
The full list of permissions for the file. This is only available if the requesting user can share the file.
System.Collections.Generic.IDictionary`2System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
A collection of arbitrary key-value pairs which are visible to all apps.Entries with null values are cleared in update and copy requests.
The number of storage quota bytes used by the file. This includes the head revision as well as previous revisions with keepForever enabled.
Whether the file has been shared.
The time at which the file was shared with the user, if applicable (RFC 3339 date-time).
The user who shared the file with the requesting user, if applicable.
The size of the file's content in bytes. This is only applicable to files with binary content in Drive.
The list of spaces which contain the file. The currently supported values are 'drive', 'appDataFolder' and 'photos'.
Whether the user has starred the file.
A short-lived link to the file's thumbnail, if available. Typically lasts on the order of hours.
Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file, and other users cannot see files in the owner's trash.
A monotonically increasing version number for the file. This reflects every change made to the file on the server, even those not visible to the user.
Additional metadata about video media. This may not be available immediately upon upload.
Whether the file has been viewed by this user.
The last time the file was viewed by the user (RFC 3339 date-time).
Whether users with only reader or commenter permission can copy the file's content. This affects copy, download, and print operations.
A link for downloading the content of the file in a browser. This is only available for files with binary content in Drive.
A link for opening the file in a relevant Google editor or viewer in a browser.
Whether users with only writer permission can modify the file's permissions.
Part of the gShell Project, relating to the Google Drive API; see Related Links or use the -Online parameter.
News - Get Started - Cmdlet Index - FAQ - Discussion - Downloads