Import-Clixml | Easy Powershell 2.0 Reference (original) (raw)

NAME
Import-Clixml

SYNOPSIS
Imports a CLIXML file and creates corresponding objects within Windows PowerShell.

SYNTAX
Import-Clixml [_-Path_] <string[]> [<CommonParameters>]

DESCRIPTION
The Import-Clixml cmdlet imports a CLIXML file with data that represents Microsoft .NET Framework objects and creates the objects in Windows PowerShell.

PARAMETERS
-Path <string[]>
Specifies the location of the XML files to be converted into Windows PowerShell objects.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

<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
System.String
You can pipe a string that contains a path to Import-Clixml.

OUTPUTS
PSObject
Import-Clixml returns objects that have been deserialized from the stored XML files.

NOTES

When specifying multiple values for a parameter, use commas to separate the values. For example, “ , ”.

————————– EXAMPLE 1 ————————–

C:\PS>Get-Process | Export-Clixml pi.xml

C:\PS> $processes = Import-Clixml pi.xml

Description
———–
This command uses the Export-Clixml cmdlet to save a serialized copy of the process information returned by Get-Process. It then uses Import-Clixml to retrieve the contents of the serialized file and re-create an object that is stored in the $processes Variable.

RELATED LINKS
Online version: http://go.microsoft.com/fwlink/?LinkID=113340

Post navigation