HCXCompute Category | Vmware PowerCLI Reference

HCX Compute Category

Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations

Step 1: Retrieve a object by running a Get command

You can READ objects by using Get-HCXComputeProfile cmdlet. See example below:

# Retrieves a list of the HCX Compute Profiles.


Step 2 : Run commands from the CRUD group

You can CREATE objects by using New-HCXComputeProfile cmdlet. See example below:

# Creates an HCX Compute Profile.

$managementNetworkProfile = Get-HCXNetworkProfile -Name "myManagementNetworkProfile" $vmotionNetworkProfile = Get-HCXNetworkProfile -Name "myVmotionNetworkProfile" $cluster = Get-HCXApplianceCompute -ClusterComputeResource $datastore = Get-HCXApplianceDatastore -Compute $cluster -Name "myDatastore" $dvs = Get-HCXInventoryDVS -Compute $cluster -Name "myDVS" New-HCXComputeProfile -ManagementNetworkProfile $managementNetworkProfile -Name "myComputeProfile" -Service BulkMigration,DisasterRecovery,Interconnect,NetworkExtension,Vmotion,WANOptimization -Datastore $datastore -DeploymentResource $cluster -ServiceCluster $cluster -DistributedSwitch $dvs -vMotionNetworkProfile $vmotionNetworkProfile
You can UPDATE objects by using Set-HCXComputeProfile cmdlet. See example below:

# Modifies the Compute Profile name.

$myComputeProfile = Get-HCXComputeProfile -Name "myComputeProfile" Set-HCXComputeProfile -Name "newComputeProfile" -ComputeProfile $myComputeProfile
You can REMOVE objects by using Remove-HCXComputeProfile cmdlet. See example below:

# Removes the Compute Profile.

$myComputeProfile = Get-HCXComputeProfile -Name "myComputeProfile" Remove-HCXComputeProfile -ComputeProfile $myComputeProfile

Step 3: Explore More Related Commands:

New-HCXComputeProfileDVS This cmdlet creates a Distributed Virtual Switch (DVS) configuration for a Compute Profile.
New-HCXComputeProfileNetwork This cmdlet creates a Network Profile configuration for the Compute Profile.