New-SCCustomProperty
Creates a custom property definition in the VMM database.
Syntax
Default (Default)
New-SCCustomProperty
[-Name] <String>
[-Description <String>]
-AddMember <CustomPropertyObjectType[]>
[-VMMServer <ServerConnection>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
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
Examples
Example 1: Create a custom property
PS C:\> $CustomProp = New-SCCustomProperty -Name "Cost Center" -AddMember "VM"
PS C:\> $CustomProp
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.
Parameters
-AddMember
Specifies an array of members that this cmdlet adds to an object that has the concept of members, such as a group. For example, this cmdlet can add one or more Active Directory® Domain Services domain users or groups to a user role. Specify members in the following formats:
- Domain\User
- User
- User@Domain
- Domain\LabGroupAlias
- LabGroupAlias
The lab group alias is an Active Directory Domain Services security group, not an email alias.
Parameter properties
Type: | CustomPropertyObjectType[] |
Default value: | None |
Accepted values: | VM, Template, VMHost, HostCluster, VMHostGroup, ServiceTemplate, ServiceInstance, ComputerTier, Cloud, ProtectionUnit |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Description
Specifies a description for the custom property definition.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies the name of a VMM object.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PROTipID
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-VMMServer
Specifies a VMM server object.
Parameter properties
Type: | ServerConnection |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.