CmdID / PowerShell / Cmdlets / Get
Get-FormatData
Gets the formatting data in the current session. PowerShell reference
From the PowerShell reference 2 parameters
What it does
Gets the formatting data in the current session. The Get-FormatData cmdlet gets the formatting data in the current session. The formatting data in the session includes formatting data from Format.ps1xml formatting files, such as those in the $PSHOME directory, formatting data for modules that you import into the session, and formatting data for commands that you import into your session by using the Import-PSSession cmdlet. You can use this cmdlet to examine the formatting data. Then, you can use the Export-FormatData cmdlet to serialize the objects, convert them to XML, and save them in Format.ps1xml files. For more information about formatting files in PowerShell, see about_Format.ps1xml.
Get-FormatData [[-TypeName] <String[]>] [-PowerShellVersion <Version>] [<CommonParameters>]
Get all formatting data
Get-FormatDataIdentifyGet formatting data by type name
Get-FormatData -TypeName 'System.Management.Automation.Cmd*'IdentifyExamine a formatting data object
$F = Get-FormatData -TypeName 'System.Management.Automation.Cmd*'
$FIdentifyGet formatting data and export it
$A = Get-FormatData
Import-Module BitsTransfer
$B = Get-FormatData
Compare-Object $A $BIdentifyTrips 1 Sigma rule: lowImport New Module Via PowerShell CommandLine by Nasreddine Bencherchali (Nextron Systems)
Get formatting data based on the specified version of PowerShell
Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion $PSVersionTable.PSVersion
TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}IdentifyIts page in the reference: Get-FormatData.
Parameters
-PowerShellVersionSpecify the version of PowerShell this cmdlet gets for the formatting data. Enter a two digit number separated by a period.
This parameter was added in PowerShell 5.1 to improve compatibility when remoting computers running older versions of PowerShell.-TypeNameSpecifies the type names that this cmdlet gets for the formatting data. Enter the type names. Wildcards are permitted.