Compress-Bzip2 Cmdlet
Parameters Output Objects Configuration Settings
The Compress-Bzip2 cmdlet implements a Bzip2 compressor.
Syntax
Compress-Bzip2 [parameters]
Remarks
The bzip2 format is only used to archive a single file. Accordingly, the operation of this cmdlet is simpler than that of the other formats.
The Input parameter should be set to the file to compress. The Output parameter should be set to the name and file path of the resulting compressed file.
The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.
# compress a file
Compress-Bzip2 -Input
"C:/temp/example.txt"
-Output
"C:/temp/example.bz2"
Parameter List
The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.
LogFile | The location of a file to which debug information is written. |
Config | Specifies one or more configuration settings. |
Input | The file to be compressed. |
LogFile | The location of a file to which debug information is written. |
Output | The archive file. |
Output Objects
The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.
ZipFile | Returned after creation of a zip file. |
Configuration Settings
The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.
UseBackgroundThread | Whether threads created by the cmdlet are background threads. |
UseInternalSecurityAPI | Tells the cmdlet whether or not to use the system security libraries or an internal implementation. |