Export (0) Print
Expand All
Expand Minimize

Test-VHD

Updated: June 7, 2013

Applies To: Windows Server 2012

Test-VHD

Tests a virtual hard disk for any problems that would make it unusable.

Syntax

Parameter Set: Default
Test-VHD [-Path] <String[]> [-ComputerName <String[]> ] [ <CommonParameters>]




Detailed Description

The Test-VHD cmdlet tests a virtual hard disk for any problems that would make it unusable.

Parameters

-ComputerName<String[]>

Specifies one or more Hyper-V hosts on which the virtual hard disk is to be tested. NetBIOS names, IP addresses, and fully-qualified domain names are allowable. The default is the local computer — use “localhost” or a dot (“.”) to specify the local computer explicitly.


Aliases

none

Required?

false

Position?

named

Default Value

.

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String[]>

Specifies the path to the virtual hard disk file of the virtual hard disk to be tested. If a filename or relative path is specified, the new virtual hard disk path is calculated relative to the current working directory.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue, ByPropertyName)

Accept Wildcard Characters?

true

<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

Tests whether the virtual hard disk chain is in a usable state that starts with the virtual hard disk associated with Diff2.vhdx.


PS C:\> Test-VHD –Path Diff2.vhdx

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