Export-PackageUpdateInfo
For AI agents: a documentation index is available at /llms.txt; a markdown version of this page is available at /docs/commands/export-packageupdateinfo/index.md.
SYNOPSIS
Exports PackageUpdateInfo objects to an XML, JSON, or CSV file.
SYNTAX
__AllParameterSets
Export-PackageUpdateInfo [[-Path] <string>] -InputObject <Info[]> [-OutputFormat <string>]
[-Encoding <string>] [-Force] [-Append] [-IncludeTimeStamp] [-PassThru] [-WhatIf] [-Confirm]
[<CommonParameters>]
ALIASES
This cmdlet has the following aliases,
DESCRIPTION
Writes PackageUpdateInfo objects produced by Get-PackageUpdateInfo to a structured data file for persistence, reporting, or later automation. The cmdlet supports XML, JSON, and CSV output formats, optional timestamping, and append mode for extending an existing file. It also supports creating the target directory when needed and can pass the exported objects back through the pipeline.
EXAMPLES
EXAMPLE 1
PS C:\> Get-PackageUpdateInfo | Export-PackageUpdateInfo
Exports the current PackageUpdateInfo objects to the default XML file.
EXAMPLE 2
PS C:\> Get-PackageUpdateInfo | Export-PackageUpdateInfo -OutputFormat JSON -Path .\updates.json -IncludeTimeStamp -PassThru
Exports the data as JSON, includes a timestamp for each record, and passes the objects through the pipeline.
EXAMPLE 3
PS C:\> Get-PackageUpdateInfo | Export-PackageUpdateInfo -OutputFormat CSV -Path .\updates.csv -Append -Force
Appends the exported data to a CSV file and creates the target directory if it does not exist.
EXAMPLE 4
PS C:\> Get-PackageUpdateInfo | Export-PackageUpdateInfo -Path C:\Temp\PackageUpdateInfo.xml -Encoding utf8
Exports the current data to a custom XML file using UTF-8 encoding.
PARAMETERS
-Append
Adds exported information to an existing file instead of replacing its current contents. This is supported for JSON and CSV output and is ignored for XML output.
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Confirm
If this switch is enabled, you will be prompted for confirmation before executing any operation that changes state.
Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Encoding
The file encoding to use when creating or updating the export file.
Type: String
DefaultValue: default
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Force
Creates the parent directory for the target file when it does not already exist and the specified path is outside the default location.
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-IncludeTimeStamp
Adds a TimeStamp property to each exported record so that the export captures the time of export for each entry.
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-InputObject
One or more PackageUpdateInfo objects to export. This parameter accepts pipeline input from Get-PackageUpdateInfo and similar commands.
Type: Info[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-OutputFormat
The output format used for the export. Supported values are “XML”, “JSON”, and “CSV”.
Type: String
DefaultValue: XML
SupportsWildcards: false
Aliases:
- Format
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-PassThru
Sends the exported objects to the pipeline after writing them to disk.
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Path
The destination file path for the exported data. Specify a file path rather than a directory path.
Default path value is: Linux: “$HOME/.config/powershell/PackageUpdateInfo/PackageUpdateInfo_$($PSEdition)$($PSVersionTable.PSVersion.Major).xml”) Windows: “$HOME\AppData\Local\Microsoft\Windows\PowerShell\PackageUpdateInfo$($PSEdition)_$($PSVersionTable.PSVersion.Major).xml”
Type: String
DefaultValue: ''
SupportsWildcards: false
Aliases:
- FullName
- FilePath
ParameterSets:
- Name: (All)
Position: 0
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-WhatIf
If this switch is enabled, no actions are performed, but informational messages are displayed that explain what would happen if the command were to run.
Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
PackageUpdate.Info[]
OUTPUTS
PackageUpdate.Info
NOTES
Version : 1.1.0.0 Author : Andi Bellstedt Date : 2026-06-21 Keywords : PackageUpdateInfo, Update, Module, Export