Custom Attribute 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
# Retrieves all global custom attributes.
Get-CustomAttribute -Global
Step 2 : Run commands from the CRUD group
# Creates a new custom attribute named CompanyName for the virtual machines and hosts on the server.
New-CustomAttribute -Name "CompanyName" -TargetType VMHost, VirtualMachine
# Renames a custom attribute from CreationDate to CreationDetails.
Set-CustomAttribute -Name CreationDetails -CustomAttribute CreationDate
# Removes the CompanyID and Owner custom attributes from the server stored in the $agent007 variable.
Remove-CustomAttribute -CustomAttribute "CompanyID", "Owner" -Server $agent007