Reset-PhysicalDisk
Resets the status of a physical disk.
Syntax
Reset-PhysicalDisk
[-FriendlyName] <String>
[-CimSession <CimSession>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
Reset-PhysicalDisk
-UniqueId <String>
[-CimSession <CimSession>]
[-ThrottleLimit <Int32>]
[-AsJob]
[<CommonParameters>]
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 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CimSession
Type: | CimSession |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InputObject
Specifies the input object that is used in a pipeline command.
Type: | CimInstance[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ThrottleLimit
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Aliases: | Id |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
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
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
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour