Export (0) Print
Expand All

Import-HwCertTestCollectionFromXml

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Import-HwCertTestCollectionFromXml

Imports a test collection from an .xml file.

Syntax

Parameter Set: Default
Import-HwCertTestCollectionFromXml [-LiteralPath] <String> [ <CommonParameters>]




Detailed Description

The Import-HwCertTestCollectionFromXml cmdlet imports a test collection from an .xml file. For more information, see Windows Hardware Certification Kit (HCK) (http://msdn.microsoft.com/en-us/library/windows/hardware/hh833788.aspx) in the Microsoft Developer Network (MSDN) Library.

After you import a test collection, you can filter it by using TestCollectionRecord properties, and then use the Export-HwCertTestCollectionToXml cmdlet to export the filtered test collection.

Parameters

-LiteralPath<String>

Specifies a full path. This is the file path to the test collection .xml file.


Aliases

XML,Input,Path

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Filter a test collection

This command imports a test collection, and then finds the results that belong to a specified content level. The command imports a test collection named All.xml, as a TestCollectionRecord object, and then passes that object to the Where-Object cmdlet by using the pipeline operator. The Where-Object cmdlet filters the imported object for results that belong to the Basic content level. For more information, type Get-Help Where-Object.


PS C:\> Import-HwCertTestCollectionFromXml -Input "C:\Temp\All.xml" | Where-Object { $_.ContentLevelSet.Contains("Basic") }

Example 2: Filter a test collection and export the results to a new test collection

This command imports a test collection, finds the results that belong to a specified content level, and exports a new test collection .xml file that contains only those results. The command imports a test collection named All.xml, as a TestCollectionRecord object, and then passes that object to the Where-Object cmdlet by using the pipeline operator. The Where-Object cmdlet filters the imported object for results that belong to the Basic content level. For more information, type Get-Help Where-Object. The command then passes those items to the Export-HwCertTestCollectionToXml cmdlet, which exports the test collection to the file named Basic.xml.


PS C:\> Import-HwCertTestCollectionFromXml -Input "C:\Temp\All.xml" | Where-Object { $_.ContentLevelSet.Contains("Basic") } | Export-HwCertTestCollectionToXml -Output "C:\Temp\Basic.xml"

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft