Set-SCCustomProperty

Set-SCCustomProperty

Modifies the properties of a custom property.

Syntax

Parameter Set: AddMembers
Set-SCCustomProperty -AddMember <CustomPropertyObjectType[]> -CustomProperty <Microsoft.SystemCenter.VirtualMachineManager.CustomProperty> [-Description <System.String> ] [-JobVariable <System.String> ] [-Name <System.String> ] [-PROTipID <Nullable [System.Guid]> ] [-RunAsynchronously] [-VMMServer <Microsoft.SystemCenter.VirtualMachineManager.Remoting.ServerConnection> ] [ <CommonParameters>]

Parameter Set: Default
Set-SCCustomProperty -CustomProperty <Microsoft.SystemCenter.VirtualMachineManager.CustomProperty> [-Description <System.String> ] [-JobVariable <System.String> ] [-Name <System.String> ] [-PROTipID <Nullable [System.Guid]> ] [-RunAsynchronously] [-VMMServer <Microsoft.SystemCenter.VirtualMachineManager.Remoting.ServerConnection> ] [ <CommonParameters>]

Parameter Set: RemoveMembers
Set-SCCustomProperty -CustomProperty <Microsoft.SystemCenter.VirtualMachineManager.CustomProperty> -RemoveMember <CustomPropertyObjectType[]> [-Description <System.String> ] [-JobVariable <System.String> ] [-Name <System.String> ] [-PROTipID <Nullable [System.Guid]> ] [-RunAsynchronously] [-VMMServer <Microsoft.SystemCenter.VirtualMachineManager.Remoting.ServerConnection> ] [ <CommonParameters>]




Detailed Description

The Set-SCCustomProperty cmdlet 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.

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<Microsoft.SystemCenter.VirtualMachineManager.CustomProperty>

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?

true(ByValue)

Accept Wildcard Characters?

false

-Description<System.String>

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?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<System.String>

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?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<System.String>

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?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Nullable [System.Guid]>

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?

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

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?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMMServer<Microsoft.SystemCenter.VirtualMachineManager.Remoting.ServerConnection>

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?

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 (http://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

Example 1: Add a member to a custom property

The first command gets the custom property object named Cost Center, and then 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"

Example Example 2: Remove a member from a custom property.

The first command gets the custom property object named Cost Center, and then 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

Community Additions

ADD
Show: