Share via


New-SCCustomProperty

New-SCCustomProperty

Creates a custom property definition in the VMM database.

Syntax

Parameter Set: Default
New-SCCustomProperty [-Name] <String> -AddMember {VM | VMHost | Template | ServiceTemplate | ServiceInstance | Cloud | VMHostGroup | HostCluster | ComputerTier}[] [-Description <String> ] [-JobVariable <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Detailed Description

The New-SCCustomProperty cmdlet creates a custom property definition in the Virtual Machine Manager (VMM) database.

You can create a custom property for the following object types: VM, Template, VMHost, HostCluster, VMHostGroup, ServiceTemplate, ServiceInstance, ComputerTier, Cloud.

Parameters

-AddMember<CustomPropertyObjectType[]>

Adds one or more members to an object that has the concept of members, such as a group. For example, AddMember adds one or more Active Directory domain users or groups to a user role.

Example formats:

-AddMember Domain\User

-AddMember User

-AddMember User@Domain

-AddMember Domain\LabGroupAlias

-AddMember LabGroupAlias (an Active Directory security group, not an email alias)

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Description<String>

States a description for the specified object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a VMM object.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

1: Create a custom property.

The first command creates a custom property object named Cost Center with VM as a member and stores the object in the $CustomProp variable.

The second command displays the properties of the custom property object stored in $CustomProp to the user.

PS C:\> $CustomProp = New-SCCustomProperty -Name "Cost Center" -AddMember "VM"
PS C:\> $CustomProp

Get-SCCustomProperty

Remove-SCCustomProperty

Set-SCCustomProperty