CmdID

CmdID / PowerShell / Cmdlets / Get

Get-FormatData

Gets the formatting data in the current session. PowerShell reference

From the PowerShell reference 2 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

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-FormatDataIdentify

Get formatting data by type name

Get-FormatData -TypeName 'System.Management.Automation.Cmd*'Identify

Examine a formatting data object

$F = Get-FormatData -TypeName 'System.Management.Automation.Cmd*' $FIdentify

Get formatting data and export it

$A = Get-FormatData Import-Module BitsTransfer $B = Get-FormatData Compare-Object $A $BIdentify

Trips 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}Identify

Its page in the reference: Get-FormatData.

Parameters

2 in the PowerShell reference
-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.