NAME
Set-DcsLogicalDiskAccess
SYNOPSIS
Sets host and mirror access to a logical disk (storage source of a virtual disk).
SYNTAX
Set-DcsLogicalDiskAccess -LogicalDisk <Object> -AccessEnabled <Boolean> [ -Connection <String> ] [ -PipelineVariable <String> ]
DESCRIPTION
Sets host and mirror access to a logical disk (storage source of a virtual disk). The cmdlet can either set host access (front-end paths) offline and disable mirror access, or set host access online and enable mirror access to a logical disk. The access setting is saved for persistence over computer restarts.
PARAMETERS
- -LogicalDisk<Object>
- LogicalDiskData object, ID or caption that identifies a logical disk. The LogicalDiskData object can be obtained from the cmdlet Get-DcsLogicalDisk.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: true (ByValue)
- Accept wildcard characters: false
-
- -AccessEnabled<Boolean>
- Use this parameter to specify whether or not to enable host access and mirror access to the logical disk. Specify $true to enable access or $false to disable access.
-
- Required: true
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -Connection<String>
- Alias of the connection to the server group. If not specified, the default connection is used.
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
- -PipelineVariable<String>
-
- Required: false
- Position: named
- Default value:
- Accept pipeline input: false
- Accept wildcard characters: false
-
INPUTS
OUTPUTS
NOTES
Also see Get-DcsLogicalDisk.
EXAMPLES
Set-DcsLogicalDiskAccess -LogicalDisk (Get-DcsLogicalDisk -Server StorageSvr001 -VirtualDisk "Virtual disk 3") -AccessEnabled $false
In this example the Logical disk is specified by invoking the cmdlet Get-DcsLogicalDisk and supplying parameters to identify the server as "StorageSvr001" and the virtual disk as "Virtual disk 3". Access is disabled by supplying $false as the value of the parameter AccessEnabled.
$LDs = Get-DcsLogicalDisk -Pool "Disk pool 3" $LDs | ForEach {Set-DcsLogicalDiskAccess -LogicalDisk $_ -AccessEnabled $false}
The cmdlet Get-DcsLogicalDisk is invoked to get all LogicalDiskData objects for all logical disks created from the pool named "Disk pool 3" and the objects are saved in the variable $LDs. Then the cmdlet Set-DcsLogicalDiskAccess is invoked to disable access to each logical disk using the objects stored in the variable.