Export (0) Print
Expand All
Expand Minimize

Test-VHD

Windows Server 2012 R2 and Windows 8.1

Updated: June 10, 2014

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

Test-VHD

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

Syntax

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

Parameter Set: SharedDisk
Test-VHD [-Path] <String[]> -SupportPersistentReservations [-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

FullName

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-SupportPersistentReservations

Indicates that the cmdlet tests for SCSI persistent reservation support semantics. Specify this parameter to test whether a virtual hard disk or path supports shared virtual disks.


Aliases

ShareVirtualDisk

Required?

true

Position?

named

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

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