Set-SCCustomPropertyValue

Set-SCCustomPropertyValue

Updates the value of a custom property.

構文

Parameter Set: InputObject
Set-SCCustomPropertyValue -CustomProperty <CustomProperty> -InputObject <ClientObject> -Value <String> [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [ <CommonParameters>]

Parameter Set: JobGroup
Set-SCCustomPropertyValue -CustomProperty <CustomProperty> -JobGroup <Guid]> -Value <String> [-JobVariable <String> ] [-OnBehalfOfUser <System.String> ] [-OnBehalfOfUserRole <Microsoft.SystemCenter.VirtualMachineManager.UserRole> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [ <CommonParameters>]

詳細説明

The Set-SCCustomPropertyValue cmdlet updates the value of a custom property.

パラメーター

-CustomProperty<CustomProperty>

Specifies a custom property object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

True (ByValue)

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

false

-InputObject<ClientObject>

Specifies the object that is assigned the property whose value you want to retrieve or change.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

True (ByValue)

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

false

-JobGroup<Guid]>

Specifies an identifier for a series of commands that will run as a set just before the final command that includes the same job group identifier runs.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

false

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

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-OnBehalfOfUser<System.String>

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-OnBehalfOfUserRole<Microsoft.SystemCenter.VirtualMachineManager.UserRole>

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

エイリアス

none

必須?

false

位置は?

named

既定値

none

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

false

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

false

-Value<String>

Specifies a string used to attribute an object or property.

エイリアス

none

必須?

true

位置は?

named

既定値

none

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

false

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

false

<CommonParameters>

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

入力

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

出力

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

  • This cmdlet requires a VMM custom property object, which can be retrieved by using the Get-SCCustomProperty cmdlet.

Example Example 1: Set the value for a custom property on a virtual machine.

The first command gets the virtual machine object named VM01, and then stores the object in the $VM variable.

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

The last command sets the value for the custom property stored in $CustomProp for the virtual machine stored in $VM to 123.

PS C:\> $VM = Get-SCVirtualMachine -Name "VM01"
PS C:\> $CustomProp = Get-SCCustomProperty -Name "Cost Center"
PS C:\> Set-SCCustomPropertyValue -InputObject $VM -CustomProperty $CustomProp -Value "123"

関連トピック

Get-SCCustomProperty

Get-SCCustomPropertyValue

Remove-SCCustomPropertyValue