< Back

Get-B2ItemProperty

Sun Jan 19, 2020 5:51 pm

NAME Get-B2ItemProperty



SYNOPSIS

The Get-B2ItemProperty cmdlet will pull extra file information.





SYNTAX

Get-B2ItemProperty [-ID] <String[]> [[-ApiUri] <Uri>] [[-ApiToken] <String>] [<CommonParameters>]





DESCRIPTION

The Get-B2ItemProperty cmdlet will pull extra file information for the specified file ID.



The file information to be returned:



- Name

- FileInfo

- Type

- Length

- BucketID

- AccountID

- SHA1

- ID



An API key is required to use this cmdlet.





PARAMETERS

-ID <String[]>

The Uri for the B2 Api query.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-ApiUri <Uri>

The Uri for the B2 Api query.



Required? false

Position? 2

Default value $script:SavedB2ApiUri

Accept pipeline input? false

Accept wildcard characters? false



-ApiToken <String>

The authorization token for the B2 account.



Required? false

Position? 3

Default value $script:SavedB2ApiToken

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

System.String



This cmdlet takes the FieldID, AccountID and ApiToken as strings.



System.Uri



This cmdlet takes the ApiUri as a Uri.





OUTPUTS

PS.B2.FileProperty



This cmdlet will output a PS.B2.FileProperty object holding the file properties.





-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-B2ItemProperty -ID 4_ze73ede9c9c8412db49f60715_f100b4e93fbae6252_d20150824_m224353_c900_v8881000_t0001



Name : akitty.jpg

ItemInfo :

ContentType : image/jpeg

ContentLength : 122573

BucketID : e73ede9c9c8412db49f60715

AccountID : 7eecc42b9675

ContentSHA1 : a01a21253a07fb08a354acd30f3a6f32abb76821

ID : 4_ze73ede9c9c8412db49f60715_f100b4e93fbae6252_d20150824_m224353_c900_v8881000_t0001



The cmdlet above returns the item properties for the ID given.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-B2Bucket | Get-B2ChildItem | Get-B2ItemProperty



Name : akitty.jpg

ItemInfo :

ContentType : image/jpeg

ContentLength : 122573

BucketID : e73ede9c9c8412db49f60715

AccountID : 7eecc42b9675

ContentSHA1 : a01a21253a07fb08a354acd30f3a6f32abb76821

ID : 4_ze73ede9c9c8412db49f60715_f100b4e93fbae6252_d20150824_m224353_c900_v8881000_t0001



Name : adoggy.jpg

ItemInfo : @{author=John}

ContentType : image/jpeg

ContentLength : 165237

BucketID : e73ede9c9c8412db49f60717

AccountID : 7eecc42b9675

ContentSHA1 : 3100d797d8c0282aeb0afac63f0795117892d2fd

ID : 4_ze73ede9c9c8412db49f60715_f100b4e93fbae6252_d20150824_m224353_c900_v8881000_t0002



The cmdlets above get the file properties for the first 1000 files in all buckets.











RELATED LINKS

https://www.backblaze.com/b2/docs/