Condividi tramite


PSDefaultValueAttribute Class

Definition

Specify a default value and/or help comment for a command parameter. This attribute does not have any semantic meaning, it is simply an aid to tools to make it simpler to know the true default value of a command parameter (which may or may not have any correlation with, e.g., the backing store of the Parameter's property or field.

public ref class PSDefaultValueAttribute sealed : System::Management::Automation::Internal::ParsingBaseAttribute
[System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)]
public sealed class PSDefaultValueAttribute : System.Management.Automation.Internal.ParsingBaseAttribute
[<System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property)>]
type PSDefaultValueAttribute = class
    inherit ParsingBaseAttribute
Public NotInheritable Class PSDefaultValueAttribute
Inherits ParsingBaseAttribute
Inheritance
Attributes

Constructors

PSDefaultValueAttribute()

Properties

Help

Specify the help string for the default value of a command parameter.

Value

Specify the default value of a command parameter. The PowerShell engine does not use this value in any way, it exists for other tools that want to reflect on cmdlets.

Applies to