Update-FormatData

Update the formatting data in the current session.

Syntax
      Update-FormatData [[-appendPath] string[]]
         [-prependPath string[]]
            [-Confirm] [-WhatIf] [CommonParameters]

Key
   -AppendPath string[]
       Add the specified formatting files to the session.

       Path to additional .ps1xml format files to be loaded. 
       These files will be processed in the order they are 
       specified and after the built-in files are loaded.

   -PrependPath string[]
       Add the specified formatting files to the session.

       Path to additional .ps1xml format files to be loaded.
       These files will be processed in the order they are 
       specified and before the built-in files are loaded.

   -Confirm
       Prompt for confirmation before executing the command.

   -WhatIf
       Describe what would happen if you executed the command without actually executing it.

Update-FormatData 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 will reload the formatting files.

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 PowerShell starts, it loads the format data from the formatting files in the PowerShell installation directory ($pshome) into the session. Use Update-FormatData to reload the formatting data into the current session without restarting PowerShell.

Examples

Update the shell format configuration from the built-in files:

PS C:\> update-formatdata

Update the shell format configuration from the built-in files plus two additional files:

PS C:\> update-typedata -prependpath RedFormat.format.Ps1xml,GreyFormat.format.Ps1xml

“Clothes and manners do not make the man; but, when he is made, they greatly improve his appearance” ~ Henry Ward Beecher

Related PowerShell Cmdlets

Update-Typedata - Update the types.mshxml file in the Microsoft Shell


 
Copyright © 1999-2024 SS64.com
Some rights reserved