Skip to content

Latest commit

 

History

History
188 lines (140 loc) · 4.95 KB

Reset-PhysicalDisk.md

File metadata and controls

188 lines (140 loc) · 4.95 KB
description external help file Module Name ms.date online version schema title
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
StorageScripts-help.xml
Storage
12/20/2016
2.0.0
Reset-PhysicalDisk

Reset-PhysicalDisk

SYNOPSIS

Resets the status of a physical disk.

SYNTAX

ByName (Default)

Reset-PhysicalDisk [-FriendlyName] <String> [-CimSession <CimSession>] [-ThrottleLimit <Int32>] [-AsJob]
 [<CommonParameters>]

ByUniqueId

Reset-PhysicalDisk -UniqueId <String> [-CimSession <CimSession>] [-ThrottleLimit <Int32>] [-AsJob]
 [<CommonParameters>]

ByInputObject

Reset-PhysicalDisk -InputObject <CimInstance[]> [-CimSession <CimSession>] [-ThrottleLimit <Int32>] [-AsJob]
 [<CommonParameters>]

DESCRIPTION

The Reset-PhysicalDisk cmdlet resets the status of a physical disk. For Storage spaces, this is a destructive operation that removes the Storage pool configuration and pool data from the specified physical disk.

If you run Reset-PhysicalDisk on a physical disk that appears as lost communication or split, this cmdlet attempts to re-integrate the disk into the Storage pool if the disk is discoverable. After you reset a physical disk, use Repair-VirtualDisk to restore its resiliency.

If you run Reset-PhysicalDisk on a disk that is not a part of a Storage pool, the operation clears any lingering Storage spaces data and metadata.

EXAMPLES

EXAMPLE 1

PS C:\> Reset-PhysicalDisk -FriendlyName "PhysicalDisk5"

This example resets the state of a specific physical disk.

EXAMPLE 2

$BadDisks = Get-Physicaldisk | Where-Object -FilterScript {$_.HealthStatus -Eq "Unhealthy"}
Foreach ($BadDisk in $BadDisks)
{
  Reset-PhysicalDisk -UniqueId $BadDisk.UniqueId
}

This example resets all of the unhealthy physical disks.

PARAMETERS

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CimSession

Type: CimSession
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FriendlyName

Specifies a friendly name for a disk. The friendly name may be defined by a user and is not guaranteed to be unique.

Type: String
Parameter Sets: ByName
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-InputObject

Specifies the input object that is used in a pipeline command.

Type: CimInstance[]
Parameter Sets: ByInputObject
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ThrottleLimit

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UniqueId

Specifies an ID used to uniquely identify a Disk object in the system. The ID persists through restarts.

Type: String
Parameter Sets: ByUniqueId
Aliases: Id

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

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

INPUTS

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisk

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

OUTPUTS

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_PhysicalDisk

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

NOTES

  • When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).

RELATED LINKS

Where-Object

Add-PhysicalDisk

Get-PhysicalDisk

Remove-PhysicalDisk

Set-PhysicalDisk