編集

次の方法で共有


Get-StorageEnclosure

Gets storage enclosures.

Syntax

ByUniqueId (Default)

Get-StorageEnclosure
    [-UniqueId <String[]>]
    [-Manufacturer <String[]>]
    [-Model <String[]>]
    [-HealthStatus <HealthStatus[]>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByFriendlyName

Get-StorageEnclosure
    [[-FriendlyName] <String[]>]
    [[-SerialNumber] <String[]>]
    [-Manufacturer <String[]>]
    [-Model <String[]>]
    [-HealthStatus <HealthStatus[]>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByPhysicalDisk

Get-StorageEnclosure
    [-Manufacturer <String[]>]
    [-Model <String[]>]
    [-HealthStatus <HealthStatus[]>]
    [-PhysicalDisk <CimInstance>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByStorageNode

Get-StorageEnclosure
    [-Manufacturer <String[]>]
    [-Model <String[]>]
    [-HealthStatus <HealthStatus[]>]
    [-StorageNode <CimInstance>]
    [-PhysicallyConnected]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByStorageSubSystem

Get-StorageEnclosure
    [-Manufacturer <String[]>]
    [-Model <String[]>]
    [-HealthStatus <HealthStatus[]>]
    [-StorageSubSystem <CimInstance>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

Description

The Get-StorageEnclosure cmdlet gets storage enclosures that are visible to your computer.

Examples

Example 1: Get all enclosures

PS C:\>Get-StorageEnclosure

This command gets all the enclosures visible to your computer.

Example 2: Get an enclosure by using a friendly name

PS C:\>Get-StorageEnclosure -FriendlyName "E1"

This command gets the enclosure named E1.

Example 3: Get an enclosure by using an ID

PS C:\>Get-StorageEnclosure -UniqueId "{b2c21800-b833-11e2-9981-806e6f6e6963}"

This command gets the enclosure that has the specified UniqueId.

Example 4: Get unhealthy enclosures

PS C:\>Get-StorageEnclosure -HealthStatus "Unhealthy"

This command gets enclosures that have the health status of Unhealthy.

Example 5: Get enclosures from a manufacturer

PS C:\>Get-StorageEnclosure -Manufacturer "Fabrikam"

This command gets enclosures from a specific manufacturer.

Example 6: Get an enclosure that contains a specified disk

PS C:\>Get-PhysicalDisk -FriendlyName "PhysicalDisk35" | Get-StorageEnclosure

This command uses the Get-PhysicalDisk cmdlet to get the disk named PhysicalDisk35, and then passes that object to the current cmdlet by using the pipeline operator. The current cmdlet gets the enclosure that contains the disk named PhysicalDisk35.

Example 7: Get enclosures attached to a storage node

PS C:\>Get-StorageNode -Name "Node14" | Get-StorageEnclosure

This command uses the Get-StorageNode cmdlet to get the storage node named Node14, and then passes that object to the current cmdlet by using the pipeline operator. The current cmdlet gets enclosures attached to the node named Node14.

Example 8: Get enclosures on a subsystem

PS C:\>Get-StorageSubSystem -FriendlyName "Clustered storage spaces on main cluster" | Get-StorageEnclosure

This command uses the Get-StorageSubSystem cmdlet to get the storage subsystem that has the specified friendly name, and then passes that object to the current cmdlet by using the pipeline operator. The current cmdlet gets enclosures on the specified subsystem.

Parameters

-AsJob

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FriendlyName

Specifies an array of friendly names. The cmdlet gets storage enclosures that the names specify.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFriendlyName
Position:0
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-HealthStatus

Specifies an array of health status values. The acceptable values for this parameter are:

  • Healthy
  • Warning
  • Unhealthy
  • Unknown

Health status describes the health of an enclosure. This cmdlet gets the enclosures that have health statuses that this parameter specifies.

Parameter properties

Type:

HealthStatus[]

Default value:None
Accepted values:Healthy, Warning, Unhealthy, Unknown
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Manufacturer

Specifies the name of a manufacturer. This cmdlet gets enclosures for the manufacturers that this parameter identifies.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Model

Specifies an array of model IDs. This cmdlet gets enclosures that the model IDs specify.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PhysicalDisk

Specifies a physical disk as a CimInstance object. The cmdlet gets storage enclosures that contain the disk that the object specifies. To obtain a physical disk object, use the Get-PhysicalDisk cmdlet.

Parameter properties

Type:CimInstance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByPhysicalDisk
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-PhysicallyConnected

Indicates that this cmdlet gets storage enclosures that are physically connected to a storage node.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByStorageNode
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SerialNumber

Specifies the serial number of the storage enclosure to get.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFriendlyName
Position:1
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-StorageNode

Specifies a storage node as a CimInstance object. The cmdlet gets storage enclosures connected to the storage node that the object specifies. To obtain a storage node object, use the Get-StorageNode cmdlet.

Parameter properties

Type:CimInstance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByStorageNode
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-StorageSubSystem

Specifies a storage subsystem as a CimInstance object. This cmdlet gets storage enclosures that belong to the subsystem that the object specifies. To obtain a storage subsystem object, use the Get-StorageSubSystem cmdlet.

Parameter properties

Type:CimInstance
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByStorageSubSystem
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments: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 PowerShell® 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.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UniqueId

Specifies an array of IDs. This cmdlet gets the enclosures that the IDs specify.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Id

Parameter sets

ByUniqueId
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

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

Outputs

MSFT_StorageEnclosure

This cmdlet returns an array of StorageEnclosure objects.

Notes

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