Gets the formatting data in the current session. (Get-FormatData)

   

# NAME
Get-FormatData

# SYNOPSIS
Gets the formatting data in the current session.

# SYNTAX
Get-FormatData [[-TypeName] <string[]>] [<CommonParameters>]

# DESCRIPTION
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 Windows PowerShell, see about_Format.ps1xml.

# PARAMETERS
-TypeName <string[]>
Gets only the formatting data with the specified type names. Enter the type names. Wildcards are permitted.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? true

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

# INPUTS
None
You cannot pipe input to this cmdlet.

# OUTPUTS
System.Management.Automation.ExtendedTypeDefinition

# NOTES

# EXAMPLE 1

C:\PS>get-formatdata

# Description
-----------
This command gets all the formatting data in the session.

# EXAMPLE 2

C:\PS>get-formatdata -typename Microsoft.Wsman*

# Description
-----------
This command gets the formatting data items whose names begin with "Microsoft.Wsman".

# EXAMPLE 3

C:\PS>$f = get-formatdata -typename helpinfoshort

C:\PS> $f

TypeName FormatViewDefinition
-------- --------------------
HelpInfoShort {help , TableControl}

C:\PS> $f.FormatViewDefinition[0].control

Headers Rows
------- ----
{System.Management.Automation.TableControlColumnHeader, System.Manageme... {System.Management.Automation.TableControlRow}

C:\PS> $f.FormatViewDefinition[0].control.headers

Label Alignment Width
----- --------- -----
Name Left 33
Category Left 9
Undefined 0

# Description
-----------
This example shows how to get a formatting data object and examine its properties.

# EXAMPLE 4

C:\PS>$a = get-formatdata

C:\PS> import-module bitstransfer
C:\PS> $b = get-formatdata
C:\PS> compare-object $a $b

InputObject SideIndicator
----------- -------------
Microsoft.BackgroundIntelligentTransfer.Management.BitsJob =>

C:\PS> get-formatdata *bits* | export-formatdata -filepath c:\test\bits.format.ps1xml

C:\PS> get-content c:\test\bits.format.ps1xml

<?xml version="1.0" encoding="utf-8"?><Configuration><ViewDefinitions>
<View><Name>Microsoft.BackgroundIntelligentTransfer.Management.BitsJob</Name>
...

# Description
-----------
This example shows how to use Get-FormatData and Export-FormatData to export the formatting data that is added by a module.

The first four commands use the Get-FormatData, Import-Module, and Compare-Object cmdlets to identify the format type that the BitsTransfer module adds to the session.

The fifth command uses the Get-FormatData cmdlet to get the format type that the BitsTransfer module adds. It uses a pipeline operator (|) to send the format type object to the Export-FormatData cmdlet, which converts it back to XML and saves it in the specified format.ps1xml file.

The final command shows an excerpt of the format.ps1xml file content.

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=144303
Export-FormatData
Update-FormatData

C:\Windows>powershell get-help Export-FormatData -full

ColorConsole [Version 1.7.1000] PowerShell 2.0-Export
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2014 Microsoft Corporation.

OS: Windows-10 / Windows-8.1 & 8 / Windows-7 & Vista / Windows Server 2008-2016
»»»» ColorConsole



 


... Home  
... Impressum
... ColorConsole

... CMD
... Netsh-XP
... Netsh-7
... Netsh-Vista
... Powershell









Download the Windows 7 Starter, Home (Basic Premium), Professional und Ultimate!

... facebook.de
0.062
Wie kann ich am Schnellsten den Programme-Ordner in Windows-8 (8.1, 10) öffnen, finden?  / Wie kann ich zwischen den Registerkarten (Tabs) im Win 8, 8.1 Internet Explorer Start-App, oder Metro-App wechseln?  / Wo finde ich Systemeigenschaften in Windows-7?  / Wie kann man die E-Mails vom Outlook-Express nach Live-Mail exportieren?  / Wie funktioniert die Windows-Aktivierung, worauf sollte ich achten?  / Unterstützt Windows-7 den Cool’n’Quiet Stromsparmodus der AMD-Prozessoren?  / Was ist eine Bootdiskete?  / Ändern der Bildschirmauflösung in Windows 10, zwei Lösungen!  / How do i know if i need to install 32 bit or 64 bit windows 7?  / Die Desktop Icons, bzw. Symbole bei Vista sind viel zu groß!  / Turn off windows 10 search indexing service (customize, disable)?  / How to use small icons in the Windows 7 Task-Bar?  /