< Back

New-vRAPropertyDefinition

Sat Jan 18, 2020 10:02 pm

NAME New-vRAPropertyDefinition



SYNOPSIS

Create a custom Property Definition





SYNTAX

New-vRAPropertyDefinition -Name <String> [-Label <String>] [-Description <String>] [-Tenant <String>] [-Index

<Int32>] [-Required] [-Encrypted] [-String] -StringDisplay <String> [-WhatIf] [-Confirm] [<CommonParameters>]



New-vRAPropertyDefinition -Name <String> [-Label <String>] [-Description <String>] [-Tenant <String>] [-Index

<Int32>] [-Required] [-Encrypted] [-Boolean] -BooleanDisplay <String> [-WhatIf] [-Confirm] [<CommonParameters>]



New-vRAPropertyDefinition -Name <String> [-Label <String>] [-Description <String>] [-Tenant <String>] [-Index

<Int32>] [-Required] [-Encrypted] [-Integer] -IntegerDisplay <String> [-WhatIf] [-Confirm] [<CommonParameters>]



New-vRAPropertyDefinition -Name <String> [-Label <String>] [-Description <String>] [-Tenant <String>] [-Index

<Int32>] [-Required] [-Encrypted] [-Decimal] -DecimalDisplay <String> [-WhatIf] [-Confirm] [<CommonParameters>]



New-vRAPropertyDefinition -Name <String> [-Label <String>] [-Description <String>] [-Tenant <String>] [-Index

<Int32>] [-Required] [-Encrypted] [-Datetime] -DatetimeDisplay <String> [-WhatIf] [-Confirm] [<CommonParameters>]



New-vRAPropertyDefinition -Name <String> [-Label <String>] [-Description <String>] [-Tenant <String>] [-Index

<Int32>] [-Required] [-Encrypted] -JSON <String> [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Create a custom Property Definition





PARAMETERS

-Name <String>

The unique name (ID) of the Property



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Label <String>

The text to display in forms for the Property



Required? false

Position? named

Default value $Name

Accept pipeline input? false

Accept wildcard characters? false



-Description <String>

Description of the Property



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Tenant <String>

The tenant in which to create the Property Definition (Defaults to the connection tenant )



Required? false

Position? named

Default value $Global:vRAConnection.Tenant

Accept pipeline input? false

Accept wildcard characters? false



-Index <Int32>

The display index of the Property



Required? false

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-Required [<SwitchParameter>]

Switch to flag the Property as required



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Encrypted [<SwitchParameter>]

Switch to flag the Property as Encrypted



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-String [<SwitchParameter>]

Switch to flag the Property type as String



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-StringDisplay <String>

The form display option for the Property



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Boolean [<SwitchParameter>]

Switch to flag the Property type as Boolean



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-BooleanDisplay <String>

The form display option for the Property



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Integer [<SwitchParameter>]

Switch to flag the Property type as Integer



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-IntegerDisplay <String>

The form display option for Integer



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Decimal [<SwitchParameter>]

Switch to flag the Property type as Decimal



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DecimalDisplay <String>

The form display option for Decimal



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Datetime [<SwitchParameter>]

Switch to flag the Property type as Datetime



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-DatetimeDisplay <String>

The form display option for Datetime



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-JSON <String>

Property Definition to send in JSON format



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Confirm [<SwitchParameter>]



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<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

System.String.





OUTPUTS

System.Management.Automation.PSObject





-------------------------- EXAMPLE 1 --------------------------



PS C:\\># Create a string dropdown with defined values



New-vRAPropertyDefinition -Name one -String -StringDisplay DROPDOWN -ValueType Static -Values

@{Name1="Value1";Name2="Value2"}









-------------------------- EXAMPLE 2 --------------------------



PS C:\\># Create an integer slider with min, max and increment



New-vRAPropertyDefinition -Name IntegerName -Label "Select an Integer" -Integer -IntegerDisplay SLIDER

-MinimumValue 1 -MaximumValue 10 -Increment 1









-------------------------- EXAMPLE 3 --------------------------



PS C:\\># Create a boolean checkbox



New-vRAPropertyDefinition -Name BooleanName -Label "Check this box" -Boolean -BooleanDisplay CHECKBOX









-------------------------- EXAMPLE 4 --------------------------



PS C:\\># Create a new decimal slider with min, max and increment



New-vRAPropertyDefinition -Name DecimalTest -Decimal -DecimalDisplay SLIDER -MinimumValue 0 -MaximumValue 10

-Increment 0.5











RELATED LINKS