次の方法で共有


InvokeCommandCommand.ScriptBlock Property

Definition

The script block that the user has specified in the cmdlet. This will be converted to a powershell before its actually sent to the remote end.

public:
 virtual property System::Management::Automation::ScriptBlock ^ ScriptBlock { System::Management::Automation::ScriptBlock ^ get(); void set(System::Management::Automation::ScriptBlock ^ value); };
public override System.Management.Automation.ScriptBlock ScriptBlock { get; set; }
[System.Management.Automation.Alias(new System.String[] { "Command" })]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="InProcess", Position=0)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="ComputerName", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="ContainerId", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="Session", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="SSHHost", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="SSHHostHashParam", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="Uri", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="VMId", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="VMName", Position=1)]
[System.Management.Automation.ValidateNotNull]
public override System.Management.Automation.ScriptBlock ScriptBlock { get; set; }
[System.Management.Automation.Alias(new System.String[] { "Command" })]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="InProcess", Position=0)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="ComputerName", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="ContainerId", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="Session", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="Uri", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="VMId", Position=1)]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="VMName", Position=1)]
[System.Management.Automation.ValidateNotNull]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="SSHHost")]
[System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="SSHHostHashParam")]
public override System.Management.Automation.ScriptBlock ScriptBlock { get; set; }
member this.ScriptBlock : System.Management.Automation.ScriptBlock with get, set
[<System.Management.Automation.Alias(new System.String[] { "Command" })>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="InProcess", Position=0)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="ComputerName", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="ContainerId", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="Session", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="SSHHost", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="SSHHostHashParam", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="Uri", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="VMId", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="VMName", Position=1)>]
[<System.Management.Automation.ValidateNotNull>]
member this.ScriptBlock : System.Management.Automation.ScriptBlock with get, set
[<System.Management.Automation.Alias(new System.String[] { "Command" })>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="InProcess", Position=0)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="ComputerName", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="ContainerId", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="Session", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="Uri", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="VMId", Position=1)>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="VMName", Position=1)>]
[<System.Management.Automation.ValidateNotNull>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="SSHHost")>]
[<System.Management.Automation.Parameter(Mandatory=true, ParameterSetName="SSHHostHashParam")>]
member this.ScriptBlock : System.Management.Automation.ScriptBlock with get, set
Public Overrides Property ScriptBlock As ScriptBlock

Property Value

Attributes

Applies to