편집

다음을 통해 공유


Test-UevTemplate

Verifies whether a template complies with the schema for UE-V.

Syntax

Path (Default)

Test-UevTemplate
    [-Path] <String[]>
    [<CommonParameters>]

LiteralPath

Test-UevTemplate
    -LiteralPath <String[]>
    [<CommonParameters>]

Description

The Test-UevTemplate cmdlet verifies whether a settings location template complies with the XML schema for Microsoft User Experience Virtualization (UE-V).

Examples

Example 1: Test a file

PS C:\> Test-UevTemplate -Path "MicrosoftWordpad.xml" | Format-Table -AutoSize
Path                                                                                     Status Message
----                                                                                     ------ -------
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftWordpad.xml Valid  The template is valid.

This command tests whether the specified file is a valid settings location template. The command passes the results to the Format-Table cmdlet by using the pipeline operator. For more information, type Get-Help Format-Table.

Example 2: Test several files

PS C:\> Test-UevTemplate -Path "*Microsoft*.xml" | Format-Table -AutoSize
Path                                                                                               Status Message
----                                                                                               ------ -------
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftCalculator.xml        Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftInternetExplorer9.xml Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftLync2010.xml          Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftNotepad.xml           Valid  The template is valid.

This command tests whether several files are valid settings location templates. The command checks all .xml files that have names that contain the specified string. The command passes the results to Format-Table by using the pipeline operator.

Example 3: Test a file specified by its literal path

PS C:\> Test-UevTemplate -LiteralPath "MicrosoftWordpad.xml" | Format-Table -AutoSize
Path                                                                                     Status Message
----                                                                                     ------ -------
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftWordpad.xml Valid  The template is valid.

This command tests whether the specified file is a valid settings location template file. The command passes the results to Format-Table by using the pipeline operator.

Example 4: Test all the files in the current directory by using the pipeline

PS C:\> Test-UevTemplate -Path "*.xml" | Format-Table -AutoSize
Path                                                                                               Status Message
----                                                                                               ------ -------
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftCalculator.xml        Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftInternetExplorer9.xml Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftLync2010.xml          Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftNotepad.xml           Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftOffice2010.xml        Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftVisualStudio2010.xml  Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftWindows7.xml          Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftWindows8.xml          Valid  The template is valid.
C:\Program Files\Microsoft User Experience Virtualization\Templates\MicrosoftWordpad.xml           Valid  The template is valid.

This command uses a wildcard to test if each file is a settings location template, and then passes the results to Format-Table by using the pipeline operator.

Parameters

-LiteralPath

Specifies an array of literal file paths. The cmdlet validates the settings location templates that have the literal paths that you specify.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:PSPath

Parameter sets

LiteralPath
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Path

Specifies an array of file paths. The cmdlet validates the settings location templates that have the paths that you specify. Use wildcards to specify multiple files.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Name

Parameter sets

Path
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

string

An array of paths to settings location templates.

Outputs

Microsoft.UEV.Commands.TestTemplateResult

This cmdlet generates a TestTemplateResult object that contains the validation result for a settings location template.