< Back

Get-SpbmEntityConfiguration

Sun Jan 19, 2020 7:15 pm

NAME Get-SpbmEntityConfiguration



SYNOPSIS

This cmdlet retrieves SPBM-related configuration data of Virtual Machine, Hard Disk, and Datastore objects.





SYNTAX

Get-SpbmEntityConfiguration [[-VM] <VIObject[]>] [-CheckComplianceNow] [-HardDisk <HardDisk[]>] [-Server

<VIServer[]>] [-Datastore <Datastore[]>] [<CommonParameters>]



Get-SpbmEntityConfiguration [-CheckComplianceNow] [-HardDisksOnly] [-Server <VIServer[]>] [-StoragePolicy

<SpbmStoragePolicy[]>] [-VMsOnly] [<CommonParameters>]





DESCRIPTION

This cmdlet retrieves SPBM-related configuration data of Virtual Machine, Hard Disk, and Datastore objects. The

configuration data includes: 1. Associated storage policy for virtual machines or hard disks. 2. Compliance status

for virtual machines or hard disks. 3. Associated default storage policy for datastores.





PARAMETERS

-CheckComplianceNow [<SwitchParameter>]

If the value is $true, checks the compliance status and updates the server cache. If $false, returns the

latest available compliance status from the server cache.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-HardDisk <HardDisk[]>

Specifies virtual disks for which you want to check compliance.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-HardDisksOnly [<SwitchParameter>]

If the value is $true, retrieves the configuration data only for hard disks.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Server <VIServer[]>

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 the Connect-VIServer cmdlet.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-StoragePolicy <SpbmStoragePolicy[]>

Specifies the storage policies against which the compliance status will be evaluated. A storage policy can be

associated with one or multiple StorageObjects (VM Home or Disks). There will be one association object with

compliance status for each policy - entity combination. If no storage policy is specified, the cmdlet returns

the status for all available storage policies.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-VM <VIObject[]>

Specifies the virtual machines, hard disks, and datastores for which you want to retrieve SPBM-related

configuration data.



Required? false

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-VMsOnly [<SwitchParameter>]

If the value is $true, retrieves the configuration data only for virtual machines.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Datastore <Datastore[]>

Specifies the datastores for which you want to retrieve default storage policy data.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



<CommonParameters>

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



OUTPUTS

Zero or more objects derived from SpbmEntityConfiguration







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/inde ... -pane.html



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



Get-SpbmEntityConfiguration -StoragePolicy $policy



Returns the SPBM configuration and compliance status of all Virtual Machine and Hard Disk objects associated with

the $policy storage policy.

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



Get-SpbmEntityConfiguration -StoragePolicy $policy -CheckComplianceNow



Returns the SPBM configuration and compliance status of all Virtual Machine and Hard Disk objects associated with

the $policy storage policy and updates the server cache.

-------------------------- Example 3 --------------------------



Get-SpbmEntityConfiguration -StoragePolicy $policy -HardDisksOnly



Returns the SPBM configuration and compliance status of all Hard Disk objects associated with the $policy storage

policy.

-------------------------- Example 4 --------------------------



Get-SpbmEntityConfiguration -VM $vm1, $vm2 -CheckComplianceNow



Returns the SPBM configuration and compliance status of the $vm1 and $vm2 virtual machines and updates the server

cache.

-------------------------- Example 5 --------------------------



Get-SpbmEntityConfiguration -HardDisk (Get-HardDisk -VM $vm1) -Datastore $datastore1



Returns the SPBM configuration and compliance status of all Hard Disk objects of the $vm1 virtual machine and the

SPBM configuration of the $datastore1 datastore.

-------------------------- Example 6 --------------------------



Get-SpbmEntityConfiguration $vm1, $vm2, $hd1, $datastore1



Returns the SPBM configuration and compliance status of the $vm1 and $vm2 virtual machines, the $hd1 hard disk,

and the SPBM configuration of the $datastore1 datastore.



RELATED LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... ation.html

Set-SpbmEntityConfiguration