< Back

Export-PSFClixml

Sun Jan 19, 2020 6:39 pm

NAME Export-PSFClixml



SYNOPSIS

Writes objects to the filesystem.





SYNTAX

Export-PSFClixml [-Path] <String> [-Depth <Int32>] [-InputObject <Object>] [-Style {String | Byte}]

[-NoCompression] [-PassThru] [-Encoding <EncodingParameter>] [<CommonParameters>]





DESCRIPTION

Writes objects to the filesystem.

In opposite to the default Export-Clixml cmdlet, this function offers data compression as the default option.



Exporting to regular clixml is still supported though.





PARAMETERS

-Path <String>

The path to write to.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Depth <Int32>

Specifies how many levels of contained objects are included in the XML representation. The default value is 2.



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-InputObject <Object>

The object(s) to serialize.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Style

Whether to export as byte (better compression) or as string (often easier to transmit using other

utilities/apis).



Required? false

Position? named

Default value Byte

Accept pipeline input? false

Accept wildcard characters? false



-NoCompression [<SwitchParameter>]

By default, exported data is compressed, saving a lot of storage at the cost of some CPU cycles.

This switch disables this compression, making string-style exports compatible with Import-Clixml.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-PassThru [<SwitchParameter>]

Passes all objects along the pipeline.

By default, Export-PSFClixml does not produce output.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Encoding <EncodingParameter>

The encoding to use when using string-style export.

By default, it exports as UTF8 encoding.



Required? false

Position? named

Default value (Get-PSFConfigValue -FullName 'PSFramework.Text.Encoding.DefaultWrite')

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



OUTPUTS



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



PS C:\\>Get-ChildItem | Export-PSFClixml -Path 'C:\\temp\\data.byte'



Exports a list of all items in the current path as compressed binary file to C:\\temp\\data.byte









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



PS C:\\>Get-ChildItem | Export-PSFClixml -Path C:\\temp\\data.xml -Style 'String' -NoCompression



Exports a list of all items in the current path as a default clixml readable by Import-Clixml











RELATED LINKS