VerbsCommon::Set Field


Updated: April 27, 2016

Applies To: Windows PowerShell

Specifies an action that replaces data on an existing resource or creates a resource that contains some data. For example, the Set-Date cmdlet changes the system time on the local computer. (The New verb can also be used to create a resource.)

Namespace:   System.Management.Automation
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

literal String^ Set

Field Value

Type: System::String^

This verb is paired with Get. For consistency with other cmdlets that perform the same action, do not use verbs such as Write, Reset, Assign, or Configure for this action.

The verb portion of a cmdlet name specifies the action that is taken by the cmdlet and is specified by the Cmdlet attribute. For more information about the declaration syntax that is used to specify the Cmdlet attribute, see Cmdlet Attribute Declaration.

For more information about the guidelines for selecting verb names, see Approved Verbs for Windows PowerShell Commands.

This example shows how this field is used in the Cmdlet attribute.

[Cmdlet(VerbsCommon.Set, "Content")]
public class SetContentCommand : Cmdlet

Return to top

Community Additions