Set-SCCustomProperty

Modifies the properties of a custom property.

Description

The Set-SCCustomProperty modifies the properties of a custom property. Properties that can be modified include the following:

- Description of the custom property
- Name of the custom property
- Add a member to the custom property
- Remove a member from the custom property

For information about creating a custom property, type: "Get-Help New-SCCustomProperty -detailed".

For more information about Set-SCCustomProperty, type: "Get-Help Set-SCCustomProperty -online".

Parameters

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

AddMember

Required? false
Accept Pipeline Input? false
Position? named
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)

CustomProperty

Required? false
Accept Pipeline Input? true (ByValue,ByPropertyName)
Position? named
Specifies a custom property object.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Name

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name of a VMM object.

CustomProperty

Required? false
Accept Pipeline Input? true (ByValue,ByPropertyName)
Position? named
Specifies a custom property object.

Description

Required? false
Accept Pipeline Input? false
Position? named
States a description for the specified object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RemoveMember

Required? false
Accept Pipeline Input? false
Position? named
Removes a member from a VMM object that has the concept of membership, such as a group. For example, RemoveMember removes one or more Active Directory domain users or groups from a user role.

Example formats:
-RemoveMember Domain\User
-RemoveMember User
-RemoveMember User@Domain
-RemoveMember Domain\LabGroupAlias
-RemoveMember LabGroupAlias (an Active Directory security group, not an email  alias)

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a VMM server object.

Examples

1: Add a member to a custom property.
PS C:\> $CustomProp = Get-SCCustomProperty -Name "Cost Center"
PS C:\> Set-SCCustomProperty -CustomProperty $CustomProp -AddMember "VMHost"

The first command gets the custom property object named Cost Center and stores the object in the $CustomProp variable.

The second command adds the VMHost member to the custom property stored in $CustomProp.
2: Remove a member from a custom property.
PS C:\> $CustomProp = Get-SCCustomProperty -Name "Cost Center"
PS C:\> Set-SCCustomProperty -CustomProperty $CustomProp -RemoveMember "VM"
The first command gets the custom property object named Cost Center and stores the object in the $CustomProp variable.

The second command removes the VM member from the custom property object stored in $CustomProp.

See Also