PowerCLI Reference

Get-SpbmCompatibleStorage

Synopsis

This cmdlet performs placement compatibility checking based on a storage requirement policy.

Syntax

Get-SpbmCompatibleStorage -StoragePolicy <SpbmStoragePolicy> [-CandidateStorage <StorageResource[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet performs placement compatibility checking based on a storage requirement policy. If the compatibility checking for a hub does not produce any errors, the hub is considered as a viable candidate for virtual machine file storage.

When the CandidateStorage parameter is specified, each object in the output is equal to some of the objects in the input (the -eq operation returns true).

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
CandidateStorageStorageResource[]Specifies a list of datastores and storage pods that are candidates for storage resources. If you do not specify this parameter, the server uses all of the datastores and storage pods for placement compatibility checking.falsetrue (ByValue)
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse
StoragePolicySpbmStoragePolicySpecifies a storage requirement policy.truetrue (ByValue)

Return Type

List of storage resources (datastores and storage pods) matching the policy

Notes

Works only with vCenter Server 5.5 or later. For more information, see the VMware Storage Policy API Reference: https://pubs.vmware.com/vsphere-60/index.jsp#com.vmware.vspsdk.apiref.doc/right-pane.html

Examples

-------------- Example 1 --------------

Get-SpbmCompatibileStorage -StoragePolicy $policy

Returns all datastores and datastore clusters that are in compliance with storage policy.

-------------- Example 2 --------------

Get-SpbmCompatibileStorage -StoragePolicy $policy -CandidateStorage $ListOfDatastoreOrDatastoreCluster

Returns all datastores and datastore clusters from the $ListOfDatastoreOrDatastoreCluster list that are in compliance with the $policy storage policy.


Copyright © VMware, Inc. All rights reserved.