Set-SCCustomProperty

Set-SCCustomProperty

Modifies the properties of a custom property.

構文

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>]

詳細説明

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.

パラメーター

-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)

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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)

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

true(ByValue)

ワイルドカード文字を許可する

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)

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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)

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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)

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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)

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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)

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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)

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

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)

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

true(ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

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"

関連トピック

Get-SCCustomProperty

New-SCCustomProperty

Remove-SCCustomProperty