Import-HwCertTestCollectionFromXml

Import-HwCertTestCollectionFromXml

Imports a test collection from an .xml file.

構文

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

詳細説明

The Import-HwCertTestCollectionFromXml cmdlet imports a test collection from an .xml file. For more information, see Windows Hardware Certification Kit (HCK) (https://msdn.microsoft.com/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.

パラメーター

-LiteralPath<String>

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

エイリアス

XML,Input,Path

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

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"

関連トピック

Export-HwCertTestCollectionToXml