< Back

Get-B2ItemVersion

Sun Jan 19, 2020 5:51 pm

NAME Get-B2ItemVersion



SYNOPSIS

The Get-B2ItemVersion cmdlet retirives file version info.





SYNTAX

Get-B2ItemVersion [-BucketID] <String[]> [[-ApiUri] <Uri>] [[-ApiToken] <String>] [<CommonParameters>]





DESCRIPTION

The Get-B2ItemVersion cmdlet retirives file version info.

Bucket information required for this cmdlet can be retirived with Get-B2Bucket.



An API key is required to use this cmdlet.





PARAMETERS

-BucketID <String[]>

The ID of the bucket to 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 AccountID and ApplicationKey as strings.



System.Uri



This cmdlet takes the ApiUri as a Uri.





OUTPUTS

PS.B2.File



The cmdlet will output a PS.B2.File object holding file version info.





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



PS C:\\>Get-B2ItemVersion -BucketID 5b232e8875c6214145260818



Name : files/hello.txt

Size : 6

UploadTime : 1439162596000

Action : upload

ID : 4_z27c88f1d182b150646ff0b16_f100920ddab886245_d20150809_m232316_c100_v0009990_t0003



Name : files/world.txt

Size : 0

UploadTime : 1439162603000

Action : upload

ID : 4_z27c88f1d182b150646ff0b16_f100920ddab886247_d20150809_m232323_c100_v0009990_t0005



Name : files/world.txt

Size : 6

UploadTime : 1439162596000

Action : upload

ID : 4_z27c88f1d182b150646ff0b16_f100920ddab886246_d20150809_m232316_c100_v0009990_t0003



The above cmdlet will return the verion information for all file versions in the given bucket.









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



PS C:\\>Get-B2Bucket | Get-B2ItemVersion



Name : files/hello.txt

Size : 6

UploadTime : 1439162596000

Action : upload

ID : 4_z27c88f1d182b150646ff0b16_f100920ddab886245_d20150809_m232316_c100_v0009990_t0003



Name : files/world.txt

Size : 0

UploadTime : 1439162603000

Action : upload

ID : 4_z27c88f1d182b150646ff0b16_f100920ddab886247_d20150809_m232323_c100_v0009990_t0005



Name : files/world.txt

Size : 6

UploadTime : 1439162596000

Action : upload

ID : 4_z27c88f1d182b150646ff0b16_f100920ddab886246_d20150809_m232316_c100_v0009990_t0003



The above cmdlet will return the verion information for all file versions in all buckets.











RELATED LINKS