vSphere PowerCLI Reference



This cmdlet creates a new custom field for a particular inventory item type.


New-CustomField [-Entity] <InventoryItem> [-Name] <String> [[-Value] <String>] [-Global] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet is deprecated and scheduled for removal.
This cmdlet creates a custom field for the object types that are provided by the Entity parameter.


NameTypeDescriptionRequired?Pipeline InputDefault Value
EntityInventoryItemSpecifies the inventory objects for which you want to create a new custom field.truetrue (ByValue)
NameStringSpecifies the name of the new custom field.truefalse
ValueStringSpecifies the value of the new custom field.falsefalse
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse$true
GlobalSwitchParameterIndicates that the new custom field applies to all types of objects.falsefalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

The specified InventoryItem object



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

New-CustomField -Entity VM -Name CPUMaxLoad -Value 300

Creates a custom field named CPUMaxLoad for the VM virtual machine, and sets it initial value to 300. The command returns the virtual machine VM, to which the new custom field belongs.

Copyright © 1998 - 2014 VMware, Inc. All rights reserved.