Get-StorageEnclosure

Get-StorageEnclosure

Gets storage enclosures.

語法

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

Parameter Set: ByFriendlyName
Get-StorageEnclosure [[-FriendlyName] <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-Manufacturer <String[]> ] [-Model <String[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

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

Parameter Set: ByStorageNode
Get-StorageEnclosure [-AsJob] [-CimSession <CimSession[]> ] [-HealthStatus <HealthStatus[]> ] [-Manufacturer <String[]> ] [-Model <String[]> ] [-StorageNode <CimInstance> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

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

詳細描述

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

參數

-AsJob

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-CimSession<CimSession[]>

在遠端工作階段或遠端電腦上執行 Cmdlet。輸入電腦名稱或工作階段物件,例如 New-CimSessionGet-CimSession Cmdlet 的輸出。預設為本機電腦上的目前工作階段。

別名

Session

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-FriendlyName<String[]>

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

別名

必要?

false

位置?

1

預設值

接受管線輸入?

True (ByPropertyName)

接受萬用字元?

true

-HealthStatus<HealthStatus[]>

Specifies an array of health status values. 此參數接受的值包括:

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

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-Manufacturer<String[]>

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

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

true

-Model<String[]>

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

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

true

-PhysicalDisk<CimInstance>

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.

別名

必要?

false

位置?

named

預設值

接受管線輸入?

True (ByValue)

接受萬用字元?

false

-StorageNode<CimInstance>

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.

別名

必要?

false

位置?

named

預設值

接受管線輸入?

True (ByValue)

接受萬用字元?

false

-StorageSubSystem<CimInstance>

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.

別名

必要?

false

位置?

named

預設值

接受管線輸入?

True (ByValue)

接受萬用字元?

false

-ThrottleLimit<Int32>

指定為執行此 Cmdlet 可建立的最大同時作業數。如果省略這個參數或輸入 0 的值,則 Windows PowerShell® 會根據在電腦上執行的 CIM Cmdlet 數目,計算 Cmdlet 的最佳節流限制。節流限制僅適用於目前 Cmdlet,不適用於工作階段或電腦。

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-UniqueId<String[]>

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

別名

Id

必要?

false

位置?

named

預設值

接受管線輸入?

True (ByPropertyName)

接受萬用字元?

true

<CommonParameters>

此 Cmdlet 支援一般參數:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 與 -OutVariable。如需詳細資訊,請參閱 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

輸入

輸入類型是您可以使用管線處理方式傳遞給 Cmdlet 的物件類型。

輸出

輸出類型是 Cmdlet 所發出的物件類型。

  • MSFT_StorageEnclosure[]

    This cmdlet returns an array of StorageEnclosure objects.

範例

Example 1: Get all enclosures

This command gets all the enclosures visible to your computer.

PS C:\> Get-StorageEnclosure

Example 2: Get an enclosure by using a friendly name

This command gets the enclosure named E1.

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

Example 3: Get an enclosure by using an ID

This command gets the enclosure that has the specified UniqueId.

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

Example 4: Get unhealthy enclosures

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

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

Example 5: Get enclosures from a manufacturer

This command gets enclosures from a specific manufacturer.

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

Example 6: Get an enclosure that contains a specified disk

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.

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

Example 7: Get enclosures attached to a storage node

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.

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

Example 8: Get enclosures on a subsystem

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.

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

相關主題

Get-StorageEnclosureVendorData

Disable-StorageEnclosureIdentification

Enable-StorageEnclosureIdentification

Get-PhysicalDisk

Get-StorageNode

Get-StorageSubSystem