Export (0) Print
Expand All
Expand Minimize

Set-SCCustomProperty

Updated: September 27, 2012

Applies To: System Center 2012 - Virtual Machine Manager

Set-SCCustomProperty

Modifies the properties of a custom property.

Syntax

Parameter Set: __AllParameterSets
Set-SCCustomProperty -CustomProperty <CustomProperty> [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: AddMembers
Set-SCCustomProperty -AddMember <CustomPropertyObjectType[]> -CustomProperty <CustomProperty> [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]

Parameter Set: RemoveMembers
Set-SCCustomProperty -CustomProperty <CustomProperty> -RemoveMember <CustomPropertyObjectType[]> [-Description <String> ] [-JobVariable <String> ] [-Name <String> ] [-PROTipID <Guid> ] [-RunAsynchronously] [-VMMServer <ServerConnection> ] [ <CommonParameters>]




Detailed 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

-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

-CustomProperty<CustomProperty>

Specifies a custom property object.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

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?

false

Position?

named

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

-RemoveMember<CustomPropertyObjectType[]>

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)


Aliases

none

Required?

true

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.

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: Add a member to a custom property.

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.


PS C:\> $CustomProp = Get-SCCustomProperty -Name "Cost Center"PS C:\> Set-SCCustomProperty -CustomProperty $CustomProp -AddMember "VMHost"

2: Remove a member from a custom property.

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.


PS C:\> $CustomProp = Get-SCCustomProperty -Name "Cost Center"PS C:\> Set-SCCustomProperty -CustomProperty $CustomProp -RemoveMember "VM"

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft