Windows PowerShell command on Get-command Set-Disk
MyWebUniversity

Windows PowerShell command on Get-command Set-Disk

NAME

Set-Disk

SYNOPSIS

Takes a Disk object or unique disk identifiers and a set of attributes, and updates the physical disk on the system.

SYNTAX

Set-Disk [-Number] [-CimSession ] [-Guid ] [-IsReadOnly ] [-Signature

] [-ThrottleLimit ] []

Set-Disk [-Number] [-CimSession ] [-IsOffline ] [-ThrottleLimit ]

[]

Set-Disk [-CimSession ] [-IsOffline ] [-ThrottleLimit ] -Path

[]

Set-Disk [-CimSession ] [-PartitionStyle {Unknown | MBR | GPT}] [-ThrottleLimit ]

[]

Set-Disk [-CimSession ] [-Guid ] [-IsReadOnly ] [-Signature ]

[-ThrottleLimit ] -Path []

Set-Disk [-CimSession ] [-Guid ] [-IsReadOnly ] [-Signature ]

[-ThrottleLimit ] -UniqueId []

Set-Disk [-CimSession ] [-Guid ] [-IsReadOnly ] [-Signature ]

[-ThrottleLimit ] []

Set-Disk [-CimSession ] [-IsOffline ] [-ThrottleLimit ] -UniqueId

[]

Set-Disk [-CimSession ] [-IsOffline ] [-ThrottleLimit ] []

Set-Disk [-Number] [-CimSession ] [-PartitionStyle {Unknown | MBR | GPT}] [-ThrottleLimit

] []

Set-Disk [-CimSession ] [-PartitionStyle {Unknown | MBR | GPT}] [-ThrottleLimit ] -Path

[]

Set-Disk [-CimSession ] [-PartitionStyle {Unknown | MBR | GPT}] [-ThrottleLimit ] -UniqueId

[]

DESCRIPTION

The Set-Disk cmdlet takes a Disk object or unique disk identifiers and a set of attributes, and updates the

physical disk on the system.

PARAMETERS

-CimSession []

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such

as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local

computer. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Guid []

Contains a globally unique ID (GUID). Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-IsOffline []

Specifies that the disk is offline. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-IsReadOnly []

Sets the disk to be read-only, or read-write (read-only = false). Note: If the disk is set to read-only, then

the disk must be set to read-only = false before using this cmdlet to set the PartitionStyle parameter.

Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Number

Specifies a disk number on which the cmdlet acts. Required? true Position? 1 Default value none

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false

-PartitionStyle []

Specifies the type of the partition. The acceptable values for this parameter are: MBR or GPT. The disk must

be initialized (such as using theInitialize-Disk cmdlet) and set to read-write (IsReadOnly $false) before this

cmdlet will work. The disk must be set to read-only = false before this cmdlet will work.

Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-Path

Contains the device instance path. Required? true Position? named Default value none

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false

-Signature []

Contains the signature of the disk. Required? false Position? named Default value none Accept pipeline input? false Accept wildcard characters? false

-ThrottleLimit []

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShellr calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer. 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. Required? true Position? named Default value none

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_Disk http://msdn.microsoft.com/library/windows/desktop/hh830493.aspx 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

None

EXAMPLE 1

PS C:\>Set-Disk -Number 5 -IsOffline $False

This example takes a disk that is offline and makes it online.

EXAMPLE 2

PS C:\>Set-Disk -Number 5 -IsReadonly $False

This example takes a disk that is read-only and makes it writeable.

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=816477

Clear-Disk

Get-Disk

Initialize-Disk

Update-Disk



Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 OurUNIX.com ™