CmdID

CmdID / PowerShell / Cmdlets / Update

Update-FormatData

Updates the formatting data in the current session. PowerShell reference

From the PowerShell reference 4 parameters

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Updates the formatting data in the current session. The Update-FormatData cmdlet reloads the formatting data from formatting files into the current session. This cmdlet lets you update the formatting data without restarting PowerShell. Without parameters, Update-FormatData reloads the formatting files that it loaded previously. You can use the parameters of Update-FormatData to add new formatting files to the session. Formatting files are text files in XML format with the format.ps1xml file name extension. The formatting data in the files defines the display of Microsoft .NET Framework objects in the session. When Windows PowerShell starts, it loads the format data from the formatting files in the PowerShell installation directory ($PSHOME) into the session. You can use Update-FormatData to reload the formatting data into the current session without restarting PowerShell. This is useful when you have added or changed a formatting file, but do not want to interrupt the session. For more information about formatting files in PowerShell, see about_Format.ps1xml.

Update-FormatData [[-AppendPath] <String[]>] [-PrependPath <String[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Reload previously loaded formatting files

Update-FormatDataIdentify

Reload formatting files and trace and log formatting files

Update-FormatData -AppendPath Trace.format.ps1xml, Log.format.ps1xmlIdentify

Edit a formatting file and reload it

Update-FormatData -PrependPath "C:\test\NewFiles.format.ps1xml" # Edit the NewFiles.format.ps1 file. Update-FormatDataIdentify

Its page in the reference: Update-FormatData.

Parameters

4 in the PowerShell reference
-AppendPathSpecifies formatting files that this cmdlet adds to the session. The files are loaded after PowerShell loads the built-in formatting files. When formatting .NET objects, PowerShell uses the first formatting definition that it finds for each .NET type. If you use the AppendPath parameter, PowerShell searches the data from the built-in files before it encounters the formatting data that you are adding. Use this parameter to add a file that formats a .NET object that is not referenced in the built-in formatting files.
-PrependPathSpecifies formatting files that this cmdlet adds to the session. The files are loaded before PowerShell loads the built-in formatting files. When formatting .NET objects, PowerShell uses the first formatting definition that it finds for each .NET type. If you use the PrependPath parameter, PowerShell searches the data from the files that you are adding before it encounters the formatting data from the built-in files. Use this parameter to add a file that formats a .NET object that is also referenced in the built-in formatting files.
-ConfirmPrompts you for confirmation before running the cmdlet.
-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.