< Back
Hide-B2Item
Post
NAME Hide-B2Item
SYNOPSIS
Hide-B2Item will mark a file name as hidden.
SYNTAX
Hide-B2Item [-Name] <String[]> [-BucketID] <String> [[-Force]] [[-ApiUri] <Uri>] [[-ApiToken] <String>] [-WhatIf]
[-Confirm] [<CommonParameters>]
DESCRIPTION
Hide-B2Item will mark a file name as hidden.
Hides a file so that downloading by name will not find the file,
but previous versions of the file are still stored.
An API key is required to use this cmdlet.
PARAMETERS
-Name <String[]>
The name of the item to hide.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-BucketID <String>
The ID of the bucket to query.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Used to bypass confirmation prompts.
Required? false
Position? 3
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ApiUri <Uri>
The Uri for the B2 Api query.
Required? false
Position? 4
Default value $script:SavedB2ApiUri
Accept pipeline input? false
Accept wildcard characters? false
-ApiToken <String>
The authorization token for the B2 account.
Required? false
Position? 5
Default value $script:SavedB2ApiToken
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
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
System.String
This cmdlet takes the Name, BucketID and ApiToken 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 upload info.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Hide-B2Item -Name items/hello.txt -BucketID 4a48fe8875c6214145260818
Name : items/hello.txt
Size : 0
UploadTime : 1437815673000
Action : hide
ID : 4_h4a48fe8875c6214145260818_f000000000000472a_d20140104_m032022_c001_v0000123_t0104
The cmdlet above will hide the latest version of the selected file in
the selected bucket.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-B2Bucket | Get-B2ChildItem | Hide-B2Item
Name : items/hello.txt
Size : 0
UploadTime : 1437815673000
Action : hide
ID : 4_h4a48fe8875c6214145260818_f000000000000472a_d20140104_m032022_c001_v0000123_t0104
Name : items/world.txt
Size : 0
UploadTime : 1437815683000
Action : hide
ID : 4_h4a48fe8875c6214145260818_f000000000000472a_d20140104_m032022_c001_v0000123_t0105
The cmdlet above will hide the latest version of the first 1000 files in all buckets.
RELATED LINKS
https://www.backblaze.com/b2/docs/
SYNOPSIS
Hide-B2Item will mark a file name as hidden.
SYNTAX
Hide-B2Item [-Name] <String[]> [-BucketID] <String> [[-Force]] [[-ApiUri] <Uri>] [[-ApiToken] <String>] [-WhatIf]
[-Confirm] [<CommonParameters>]
DESCRIPTION
Hide-B2Item will mark a file name as hidden.
Hides a file so that downloading by name will not find the file,
but previous versions of the file are still stored.
An API key is required to use this cmdlet.
PARAMETERS
-Name <String[]>
The name of the item to hide.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-BucketID <String>
The ID of the bucket to query.
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Used to bypass confirmation prompts.
Required? false
Position? 3
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-ApiUri <Uri>
The Uri for the B2 Api query.
Required? false
Position? 4
Default value $script:SavedB2ApiUri
Accept pipeline input? false
Accept wildcard characters? false
-ApiToken <String>
The authorization token for the B2 account.
Required? false
Position? 5
Default value $script:SavedB2ApiToken
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
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
System.String
This cmdlet takes the Name, BucketID and ApiToken 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 upload info.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Hide-B2Item -Name items/hello.txt -BucketID 4a48fe8875c6214145260818
Name : items/hello.txt
Size : 0
UploadTime : 1437815673000
Action : hide
ID : 4_h4a48fe8875c6214145260818_f000000000000472a_d20140104_m032022_c001_v0000123_t0104
The cmdlet above will hide the latest version of the selected file in
the selected bucket.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-B2Bucket | Get-B2ChildItem | Hide-B2Item
Name : items/hello.txt
Size : 0
UploadTime : 1437815673000
Action : hide
ID : 4_h4a48fe8875c6214145260818_f000000000000472a_d20140104_m032022_c001_v0000123_t0104
Name : items/world.txt
Size : 0
UploadTime : 1437815683000
Action : hide
ID : 4_h4a48fe8875c6214145260818_f000000000000472a_d20140104_m032022_c001_v0000123_t0105
The cmdlet above will hide the latest version of the first 1000 files in all buckets.
RELATED LINKS
https://www.backblaze.com/b2/docs/