Remove src\Microsoft.PowerShell.Management.Activities (#4586)
This commit is contained in:
parent
ddef0690f2
commit
e687cab952
|
@ -1,18 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Security.Permissions;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("3.0.0.0")]
|
||||
[assembly: System.Runtime.InteropServices.ComVisible(false)]
|
||||
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: ReliabilityContractAttribute(Consistency.MayCorruptAppDomain, Cer.MayFail)]
|
||||
[assembly: AssemblyTitle("Microsoft.PowerShell.Management.Activities")]
|
||||
[assembly: AssemblyDescription("Microsoft.PowerShell.Management.Activities")]
|
||||
|
||||
[module: SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant")]
|
||||
|
|
@ -1,224 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Add-Computer command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class AddComputer : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public AddComputer()
|
||||
{
|
||||
this.DisplayName = "Add-Computer";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Add-Computer"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LocalCredential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> LocalCredential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the UnjoinDomainCredential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> UnjoinDomainCredential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the DomainName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> DomainName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the OUPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> OUPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Server parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Server { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Unsecure parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Unsecure { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Options parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<Microsoft.PowerShell.Commands.JoinOptions> Options { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the WorkgroupName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> WorkgroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Restart parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Restart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NewName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> NewName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(LocalCredential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LocalCredential", LocalCredential.Get(context));
|
||||
}
|
||||
|
||||
if(UnjoinDomainCredential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("UnjoinDomainCredential", UnjoinDomainCredential.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(DomainName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DomainName", DomainName.Get(context));
|
||||
}
|
||||
|
||||
if(OUPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("OUPath", OUPath.Get(context));
|
||||
}
|
||||
|
||||
if(Server.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Server", Server.Get(context));
|
||||
}
|
||||
|
||||
if(Unsecure.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Unsecure", Unsecure.Get(context));
|
||||
}
|
||||
|
||||
if(Options.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Options", Options.Get(context));
|
||||
}
|
||||
|
||||
if(WorkgroupName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("WorkgroupName", WorkgroupName.Get(context));
|
||||
}
|
||||
|
||||
if(Restart.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Restart", Restart.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(NewName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NewName", NewName.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,202 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Add-Content command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class AddContent : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public AddContent()
|
||||
{
|
||||
this.DisplayName = "Add-Content";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Add-Content"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Value parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Object[]> Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NoNewline parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> NoNewline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Encoding parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding> Encoding { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Stream parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Stream { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Value.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Value", Value.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(NoNewline.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NoNewline", NoNewline.Get(context));
|
||||
}
|
||||
|
||||
if(Encoding.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Encoding", Encoding.Get(context));
|
||||
}
|
||||
|
||||
if(Stream.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Stream", Stream.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Checkpoint-Computer command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class CheckpointComputer : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public CheckpointComputer()
|
||||
{
|
||||
this.DisplayName = "Checkpoint-Computer";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Checkpoint-Computer"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Description parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the RestorePointType parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> RestorePointType { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Description.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Description", Description.Get(context));
|
||||
}
|
||||
|
||||
if(RestorePointType.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("RestorePointType", RestorePointType.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Clear-Content command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class ClearContent : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public ClearContent()
|
||||
{
|
||||
this.DisplayName = "Clear-Content";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-Content"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Stream parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Stream { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(Stream.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Stream", Stream.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Clear-EventLog command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class ClearEventLog : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public ClearEventLog()
|
||||
{
|
||||
this.DisplayName = "Clear-EventLog";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-EventLog"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LogName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LogName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(LogName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LogName", LogName.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Clear-Item command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class ClearItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public ClearItem()
|
||||
{
|
||||
this.DisplayName = "Clear-Item";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-Item"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,166 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Clear-ItemProperty command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class ClearItemProperty : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public ClearItemProperty()
|
||||
{
|
||||
this.DisplayName = "Clear-ItemProperty";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-ItemProperty"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Clear-RecycleBin command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class ClearRecycleBin : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public ClearRecycleBin()
|
||||
{
|
||||
this.DisplayName = "Clear-RecycleBin";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-RecycleBin"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the DriveLetter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> DriveLetter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(DriveLetter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DriveLetter", DriveLetter.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Convert-Path command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class ConvertPath : PSActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public ConvertPath()
|
||||
{
|
||||
this.DisplayName = "Convert-Path";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Convert-Path"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,214 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Copy-Item command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class CopyItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public CopyItem()
|
||||
{
|
||||
this.DisplayName = "Copy-Item";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Copy-Item"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Destination parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Destination { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Container parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Container { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Recurse parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Recurse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the FromSession parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.Runspaces.PSSession> FromSession { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ToSession parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.Runspaces.PSSession> ToSession { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Destination.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Destination", Destination.Get(context));
|
||||
}
|
||||
|
||||
if(Container.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Container", Container.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Recurse.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Recurse", Recurse.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(FromSession.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("FromSession", FromSession.Get(context));
|
||||
}
|
||||
|
||||
if(ToSession.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ToSession", ToSession.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Copy-ItemProperty command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class CopyItemProperty : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public CopyItemProperty()
|
||||
{
|
||||
this.DisplayName = "Copy-ItemProperty";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Copy-ItemProperty"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Destination parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Destination { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(Destination.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Destination", Destination.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Disable-ComputerRestore command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class DisableComputerRestore : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public DisableComputerRestore()
|
||||
{
|
||||
this.DisplayName = "Disable-ComputerRestore";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Disable-ComputerRestore"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Drive parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Drive { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Drive.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Drive", Drive.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Enable-ComputerRestore command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class EnableComputerRestore : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public EnableComputerRestore()
|
||||
{
|
||||
this.DisplayName = "Enable-ComputerRestore";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Enable-ComputerRestore"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Drive parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Drive { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Drive.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Drive", Drive.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,238 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-ChildItem command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetChildItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetChildItem()
|
||||
{
|
||||
this.DisplayName = "Get-ChildItem";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-ChildItem"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Recurse parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Recurse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Depth parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.UInt32> Depth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Attributes parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.FlagsExpression<System.IO.FileAttributes>> Attributes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Directory parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Directory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the File parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> File { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Hidden parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Hidden { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ReadOnly parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> ReadOnly { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the System parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> System { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Recurse.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Recurse", Recurse.Get(context));
|
||||
}
|
||||
|
||||
if(Depth.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Depth", Depth.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(Attributes.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Attributes", Attributes.Get(context));
|
||||
}
|
||||
|
||||
if(Directory.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Directory", Directory.Get(context));
|
||||
}
|
||||
|
||||
if(File.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("File", File.Get(context));
|
||||
}
|
||||
|
||||
if(Hidden.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Hidden", Hidden.Get(context));
|
||||
}
|
||||
|
||||
if(ReadOnly.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ReadOnly", ReadOnly.Get(context));
|
||||
}
|
||||
|
||||
if(System.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("System", System.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-ComputerRestorePoint command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetComputerRestorePoint : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetComputerRestorePoint()
|
||||
{
|
||||
this.DisplayName = "Get-ComputerRestorePoint";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-ComputerRestorePoint"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the RestorePoint parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32[]> RestorePoint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LastStatus parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> LastStatus { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(RestorePoint.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("RestorePoint", RestorePoint.Get(context));
|
||||
}
|
||||
|
||||
if(LastStatus.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LastStatus", LastStatus.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,238 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-Content command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetContent : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetContent()
|
||||
{
|
||||
this.DisplayName = "Get-Content";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Content"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ReadCount parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int64> ReadCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the TotalCount parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int64> TotalCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Tail parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> Tail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Delimiter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Delimiter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Wait parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Wait { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Raw parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Raw { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Encoding parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding> Encoding { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Stream parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Stream { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(ReadCount.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ReadCount", ReadCount.Get(context));
|
||||
}
|
||||
|
||||
if(TotalCount.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("TotalCount", TotalCount.Get(context));
|
||||
}
|
||||
|
||||
if(Tail.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Tail", Tail.Get(context));
|
||||
}
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(Delimiter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Delimiter", Delimiter.Get(context));
|
||||
}
|
||||
|
||||
if(Wait.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Wait", Wait.Get(context));
|
||||
}
|
||||
|
||||
if(Raw.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Raw", Raw.Get(context));
|
||||
}
|
||||
|
||||
if(Encoding.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Encoding", Encoding.Get(context));
|
||||
}
|
||||
|
||||
if(Stream.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Stream", Stream.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,224 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-EventLog command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetEventLog : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetEventLog()
|
||||
{
|
||||
this.DisplayName = "Get-EventLog";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-EventLog"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LogName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> LogName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Newest parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> Newest { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the After parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.DateTime> After { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Before parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.DateTime> Before { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the UserName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InstanceId parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int64[]> InstanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Index parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32[]> Index { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the EntryType parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> EntryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Source parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Message parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the AsBaseObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> AsBaseObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the List parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> List { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the AsString parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> AsString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(LogName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LogName", LogName.Get(context));
|
||||
}
|
||||
|
||||
if(Newest.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Newest", Newest.Get(context));
|
||||
}
|
||||
|
||||
if(After.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("After", After.Get(context));
|
||||
}
|
||||
|
||||
if(Before.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Before", Before.Get(context));
|
||||
}
|
||||
|
||||
if(UserName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("UserName", UserName.Get(context));
|
||||
}
|
||||
|
||||
if(InstanceId.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InstanceId", InstanceId.Get(context));
|
||||
}
|
||||
|
||||
if(Index.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Index", Index.Get(context));
|
||||
}
|
||||
|
||||
if(EntryType.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("EntryType", EntryType.Get(context));
|
||||
}
|
||||
|
||||
if(Source.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Source", Source.Get(context));
|
||||
}
|
||||
|
||||
if(Message.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Message", Message.Get(context));
|
||||
}
|
||||
|
||||
if(AsBaseObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("AsBaseObject", AsBaseObject.Get(context));
|
||||
}
|
||||
|
||||
if(List.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("List", List.Get(context));
|
||||
}
|
||||
|
||||
if(AsString.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("AsString", AsString.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,104 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-HotFix command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetHotFix : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetHotFix()
|
||||
{
|
||||
this.DisplayName = "Get-HotFix";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-HotFix"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the HotFixId parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> HotFixId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Description parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(HotFixId.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Id", HotFixId.Get(context));
|
||||
}
|
||||
|
||||
if(Description.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Description", Description.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-Item command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetItem()
|
||||
{
|
||||
this.DisplayName = "Get-Item";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Item"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Stream parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Stream { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(Stream.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Stream", Stream.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-ItemProperty command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetItemProperty : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetItemProperty()
|
||||
{
|
||||
this.DisplayName = "Get-ItemProperty";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-ItemProperty"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-ItemPropertyValue command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetItemPropertyValue : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetItemPropertyValue()
|
||||
{
|
||||
this.DisplayName = "Get-ItemPropertyValue";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-ItemPropertyValue"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-Location command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetLocation : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetLocation()
|
||||
{
|
||||
this.DisplayName = "Get-Location";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Location"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PSProvider parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> PSProvider { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PSDrive parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> PSDrive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Stack parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Stack { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the StackName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> StackName { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(PSProvider.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PSProvider", PSProvider.Get(context));
|
||||
}
|
||||
|
||||
if(PSDrive.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PSDrive", PSDrive.Get(context));
|
||||
}
|
||||
|
||||
if(Stack.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Stack", Stack.Get(context));
|
||||
}
|
||||
|
||||
if(StackName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("StackName", StackName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-PSDrive command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetPSDrive : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetPSDrive()
|
||||
{
|
||||
this.DisplayName = "Get-PSDrive";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-PSDrive"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Scope parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Scope { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PSProvider parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> PSProvider { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralName", LiteralName.Get(context));
|
||||
}
|
||||
|
||||
if(Scope.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Scope", Scope.Get(context));
|
||||
}
|
||||
|
||||
if(PSProvider.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PSProvider", PSProvider.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-PSProvider command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetPSProvider : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetPSProvider()
|
||||
{
|
||||
this.DisplayName = "Get-PSProvider";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-PSProvider"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PSProvider parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> PSProvider { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(PSProvider.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PSProvider", PSProvider.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-Process command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetProcess : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetProcess()
|
||||
{
|
||||
this.DisplayName = "Get-Process";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Process"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ProcessId parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32[]> ProcessId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Diagnostics.Process[]> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the IncludeUserName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> IncludeUserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Module parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Module { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the FileVersionInfo parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> FileVersionInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(ProcessId.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Id", ProcessId.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(IncludeUserName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("IncludeUserName", IncludeUserName.Get(context));
|
||||
}
|
||||
|
||||
if(Module.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Module", Module.Get(context));
|
||||
}
|
||||
|
||||
if(FileVersionInfo.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("FileVersionInfo", FileVersionInfo.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Get-Service command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class GetService : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public GetService()
|
||||
{
|
||||
this.DisplayName = "Get-Service";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Service"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the DependentServices parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> DependentServices { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the RequiredServices parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> RequiredServices { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ServiceDisplayName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ServiceDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.ServiceProcess.ServiceController[]> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(DependentServices.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DependentServices", DependentServices.Get(context));
|
||||
}
|
||||
|
||||
if(RequiredServices.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("RequiredServices", RequiredServices.Get(context));
|
||||
}
|
||||
|
||||
if(ServiceDisplayName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Invoke-Item command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class InvokeItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public InvokeItem()
|
||||
{
|
||||
this.DisplayName = "Invoke-Item";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Invoke-Item"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Join-Path command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class JoinPath : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public JoinPath()
|
||||
{
|
||||
this.DisplayName = "Join-Path";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Join-Path"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ChildPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> ChildPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Resolve parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Resolve { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(ChildPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ChildPath", ChildPath.Get(context));
|
||||
}
|
||||
|
||||
if(Resolve.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Resolve", Resolve.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,116 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Limit-EventLog command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class LimitEventLog : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public LimitEventLog()
|
||||
{
|
||||
this.DisplayName = "Limit-EventLog";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Limit-EventLog"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LogName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LogName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the RetentionDays parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> RetentionDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the OverflowAction parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Diagnostics.OverflowAction> OverflowAction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the MaximumSize parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int64> MaximumSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(LogName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LogName", LogName.Get(context));
|
||||
}
|
||||
|
||||
if(RetentionDays.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("RetentionDays", RetentionDays.Get(context));
|
||||
}
|
||||
|
||||
if(OverflowAction.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("OverflowAction", OverflowAction.Get(context));
|
||||
}
|
||||
|
||||
if(MaximumSize.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("MaximumSize", MaximumSize.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,166 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Move-Item command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class MoveItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public MoveItem()
|
||||
{
|
||||
this.DisplayName = "Move-Item";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Move-Item"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Destination parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Destination { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Destination.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Destination", Destination.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Move-ItemProperty command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class MoveItemProperty : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public MoveItemProperty()
|
||||
{
|
||||
this.DisplayName = "Move-ItemProperty";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Move-ItemProperty"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Destination parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Destination { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(Destination.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Destination", Destination.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,128 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\New-EventLog command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class NewEventLog : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public NewEventLog()
|
||||
{
|
||||
this.DisplayName = "New-EventLog";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-EventLog"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the CategoryResourceFile parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> CategoryResourceFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LogName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> LogName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the MessageResourceFile parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> MessageResourceFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ParameterResourceFile parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> ParameterResourceFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Source parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(CategoryResourceFile.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("CategoryResourceFile", CategoryResourceFile.Get(context));
|
||||
}
|
||||
|
||||
if(LogName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LogName", LogName.Get(context));
|
||||
}
|
||||
|
||||
if(MessageResourceFile.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("MessageResourceFile", MessageResourceFile.Get(context));
|
||||
}
|
||||
|
||||
if(ParameterResourceFile.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ParameterResourceFile", ParameterResourceFile.Get(context));
|
||||
}
|
||||
|
||||
if(Source.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Source", Source.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\New-Item command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class NewItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public NewItem()
|
||||
{
|
||||
this.DisplayName = "New-Item";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-Item"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ItemType parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> ItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Value parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Object> Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(ItemType.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ItemType", ItemType.Get(context));
|
||||
}
|
||||
|
||||
if(Value.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Value", Value.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\New-ItemProperty command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class NewItemProperty : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public NewItemProperty()
|
||||
{
|
||||
this.DisplayName = "New-ItemProperty";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-ItemProperty"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PropertyType parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> PropertyType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Value parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Object> Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(PropertyType.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PropertyType", PropertyType.Get(context));
|
||||
}
|
||||
|
||||
if(Value.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Value", Value.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\New-Service command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class NewService : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public NewService()
|
||||
{
|
||||
this.DisplayName = "New-Service";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-Service"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the BinaryPathName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> BinaryPathName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ServiceDisplayName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> ServiceDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Description parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the StartupType parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.ServiceProcess.ServiceStartMode> StartupType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the DependsOn parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> DependsOn { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(BinaryPathName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("BinaryPathName", BinaryPathName.Get(context));
|
||||
}
|
||||
|
||||
if(ServiceDisplayName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
|
||||
}
|
||||
|
||||
if(Description.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Description", Description.Get(context));
|
||||
}
|
||||
|
||||
if(StartupType.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("StartupType", StartupType.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(DependsOn.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DependsOn", DependsOn.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,118 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\New-WebServiceProxy command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class NewWebServiceProxy : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public NewWebServiceProxy()
|
||||
{
|
||||
this.DisplayName = "New-WebServiceProxy";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-WebServiceProxy"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Uri parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Uri> Uri { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Class parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Namespace parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Namespace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the UseDefaultCredential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> UseDefaultCredential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Uri.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Uri", Uri.Get(context));
|
||||
}
|
||||
|
||||
if(Class.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Class", Class.Get(context));
|
||||
}
|
||||
|
||||
if(Namespace.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Namespace", Namespace.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(UseDefaultCredential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("UseDefaultCredential", UseDefaultCredential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,202 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Register-WmiEvent command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RegisterWmiEvent : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RegisterWmiEvent()
|
||||
{
|
||||
this.DisplayName = "Register-WmiEvent";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Register-WmiEvent"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Namespace parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Namespace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ComputerName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> ComputerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Class parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Query parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Query { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Timeout parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int64> Timeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the SourceIdentifier parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> SourceIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Action parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.ScriptBlock> Action { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the MessageData parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSObject> MessageData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the SupportEvent parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> SupportEvent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Forward parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Forward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the MaxTriggerCount parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> MaxTriggerCount { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Namespace.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Namespace", Namespace.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(ComputerName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", ComputerName.Get(context));
|
||||
}
|
||||
|
||||
if(Class.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Class", Class.Get(context));
|
||||
}
|
||||
|
||||
if(Query.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Query", Query.Get(context));
|
||||
}
|
||||
|
||||
if(Timeout.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Timeout", Timeout.Get(context));
|
||||
}
|
||||
|
||||
if(SourceIdentifier.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("SourceIdentifier", SourceIdentifier.Get(context));
|
||||
}
|
||||
|
||||
if(Action.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Action", Action.Get(context));
|
||||
}
|
||||
|
||||
if(MessageData.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("MessageData", MessageData.Get(context));
|
||||
}
|
||||
|
||||
if(SupportEvent.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("SupportEvent", SupportEvent.Get(context));
|
||||
}
|
||||
|
||||
if(Forward.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Forward", Forward.Get(context));
|
||||
}
|
||||
|
||||
if(MaxTriggerCount.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("MaxTriggerCount", MaxTriggerCount.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Remove-Computer command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RemoveComputer : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RemoveComputer()
|
||||
{
|
||||
this.DisplayName = "Remove-Computer";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-Computer"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the UnjoinDomainCredential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> UnjoinDomainCredential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LocalCredential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> LocalCredential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Restart parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Restart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the WorkgroupName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> WorkgroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(UnjoinDomainCredential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("UnjoinDomainCredential", UnjoinDomainCredential.Get(context));
|
||||
}
|
||||
|
||||
if(LocalCredential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LocalCredential", LocalCredential.Get(context));
|
||||
}
|
||||
|
||||
if(Restart.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Restart", Restart.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(WorkgroupName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("WorkgroupName", WorkgroupName.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Remove-EventLog command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RemoveEventLog : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RemoveEventLog()
|
||||
{
|
||||
this.DisplayName = "Remove-EventLog";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-EventLog"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LogName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LogName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Source parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(LogName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LogName", LogName.Get(context));
|
||||
}
|
||||
|
||||
if(Source.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Source", Source.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,166 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Remove-Item command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RemoveItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RemoveItem()
|
||||
{
|
||||
this.DisplayName = "Remove-Item";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-Item"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Recurse parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Recurse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Stream parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Stream { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Recurse.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Recurse", Recurse.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(Stream.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Stream", Stream.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Remove-ItemProperty command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RemoveItemProperty : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RemoveItemProperty()
|
||||
{
|
||||
this.DisplayName = "Remove-ItemProperty";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-ItemProperty"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,214 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Remove-WmiObject command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RemoveWmiObject : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RemoveWmiObject()
|
||||
{
|
||||
this.DisplayName = "Remove-WmiObject";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-WmiObject"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.ManagementObject> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Class parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the AsJob parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> AsJob { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Impersonation parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.ImpersonationLevel> Impersonation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Authentication parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.AuthenticationLevel> Authentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Locale parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Locale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the EnableAllPrivileges parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> EnableAllPrivileges { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Authority parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Authority { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ThrottleLimit parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> ThrottleLimit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ComputerName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ComputerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Namespace parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Namespace { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(Class.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Class", Class.Get(context));
|
||||
}
|
||||
|
||||
if(AsJob.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("AsJob", AsJob.Get(context));
|
||||
}
|
||||
|
||||
if(Impersonation.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Impersonation", Impersonation.Get(context));
|
||||
}
|
||||
|
||||
if(Authentication.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Authentication", Authentication.Get(context));
|
||||
}
|
||||
|
||||
if(Locale.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Locale", Locale.Get(context));
|
||||
}
|
||||
|
||||
if(EnableAllPrivileges.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("EnableAllPrivileges", EnableAllPrivileges.Get(context));
|
||||
}
|
||||
|
||||
if(Authority.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Authority", Authority.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(ThrottleLimit.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ThrottleLimit", ThrottleLimit.Get(context));
|
||||
}
|
||||
|
||||
if(ComputerName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", ComputerName.Get(context));
|
||||
}
|
||||
|
||||
if(Namespace.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Namespace", Namespace.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Rename-Computer command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RenameComputer : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RenameComputer()
|
||||
{
|
||||
this.DisplayName = "Rename-Computer";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Rename-Computer"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the DomainCredential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> DomainCredential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LocalCredential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> LocalCredential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NewName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> NewName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Restart parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Restart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the WsmanAuthentication parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> WsmanAuthentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Protocol parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Protocol { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(DomainCredential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DomainCredential", DomainCredential.Get(context));
|
||||
}
|
||||
|
||||
if(LocalCredential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LocalCredential", LocalCredential.Get(context));
|
||||
}
|
||||
|
||||
if(NewName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NewName", NewName.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Restart.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Restart", Restart.Get(context));
|
||||
}
|
||||
|
||||
if(WsmanAuthentication.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("WsmanAuthentication", WsmanAuthentication.Get(context));
|
||||
}
|
||||
|
||||
if(Protocol.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Protocol", Protocol.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Rename-Item command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RenameItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RenameItem()
|
||||
{
|
||||
this.DisplayName = "Rename-Item";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Rename-Item"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NewName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> NewName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(NewName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NewName", NewName.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Rename-ItemProperty command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RenameItemProperty : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RenameItemProperty()
|
||||
{
|
||||
this.DisplayName = "Rename-ItemProperty";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Rename-ItemProperty"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NewName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> NewName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(NewName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NewName", NewName.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Reset-ComputerMachinePassword command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class ResetComputerMachinePassword : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public ResetComputerMachinePassword()
|
||||
{
|
||||
this.DisplayName = "Reset-ComputerMachinePassword";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Reset-ComputerMachinePassword"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Server parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Server { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Server.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Server", Server.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Resolve-Path command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class ResolvePath : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public ResolvePath()
|
||||
{
|
||||
this.DisplayName = "Resolve-Path";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Resolve-Path"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Relative parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Relative { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Relative.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Relative", Relative.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Restart-Service command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RestartService : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RestartService()
|
||||
{
|
||||
this.DisplayName = "Restart-Service";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Restart-Service"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.ServiceProcess.ServiceController[]> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ServiceDisplayName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ServiceDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(ServiceDisplayName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Restore-Computer command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class RestoreComputer : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RestoreComputer()
|
||||
{
|
||||
this.DisplayName = "Restore-Computer";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Restore-Computer"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the RestorePoint parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> RestorePoint { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(RestorePoint.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("RestorePoint", RestorePoint.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Resume-Service command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class ResumeService : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public ResumeService()
|
||||
{
|
||||
this.DisplayName = "Resume-Service";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Resume-Service"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.ServiceProcess.ServiceController[]> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ServiceDisplayName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ServiceDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(ServiceDisplayName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,202 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Set-Content command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class SetContent : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public SetContent()
|
||||
{
|
||||
this.DisplayName = "Set-Content";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-Content"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Value parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Object[]> Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NoNewline parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> NoNewline { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Encoding parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<Microsoft.PowerShell.Commands.FileSystemCmdletProviderEncoding> Encoding { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Stream parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Stream { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Value.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Value", Value.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(NoNewline.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NoNewline", NoNewline.Get(context));
|
||||
}
|
||||
|
||||
if(Encoding.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Encoding", Encoding.Get(context));
|
||||
}
|
||||
|
||||
if(Stream.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Stream", Stream.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,166 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Set-Item command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class SetItem : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public SetItem()
|
||||
{
|
||||
this.DisplayName = "Set-Item";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-Item"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Value parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Object> Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Value.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Value", Value.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,190 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Set-ItemProperty command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class SetItemProperty : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public SetItemProperty()
|
||||
{
|
||||
this.DisplayName = "Set-ItemProperty";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-ItemProperty"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Value parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Object> Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSObject> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(Value.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Value", Value.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Set-Service command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class SetService : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public SetService()
|
||||
{
|
||||
this.DisplayName = "Set-Service";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-Service"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ServiceDisplayName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> ServiceDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Description parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the StartupType parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.ServiceProcess.ServiceStartMode> StartupType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Status parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.ServiceProcess.ServiceController> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(ServiceDisplayName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
|
||||
}
|
||||
|
||||
if(Description.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Description", Description.Get(context));
|
||||
}
|
||||
|
||||
if(StartupType.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("StartupType", StartupType.Get(context));
|
||||
}
|
||||
|
||||
if(Status.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Status", Status.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,238 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Set-WmiInstance command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class SetWmiInstance : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public SetWmiInstance()
|
||||
{
|
||||
this.DisplayName = "Set-WmiInstance";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-WmiInstance"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.ManagementObject> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Class parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Class { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Arguments parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Collections.Hashtable> Arguments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PutType parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.PutType> PutType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the AsJob parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> AsJob { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Impersonation parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.ImpersonationLevel> Impersonation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Authentication parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.AuthenticationLevel> Authentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Locale parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Locale { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the EnableAllPrivileges parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> EnableAllPrivileges { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Authority parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Authority { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ThrottleLimit parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> ThrottleLimit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ComputerName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ComputerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Namespace parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Namespace { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(Class.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Class", Class.Get(context));
|
||||
}
|
||||
|
||||
if(Arguments.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Arguments", Arguments.Get(context));
|
||||
}
|
||||
|
||||
if(PutType.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PutType", PutType.Get(context));
|
||||
}
|
||||
|
||||
if(AsJob.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("AsJob", AsJob.Get(context));
|
||||
}
|
||||
|
||||
if(Impersonation.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Impersonation", Impersonation.Get(context));
|
||||
}
|
||||
|
||||
if(Authentication.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Authentication", Authentication.Get(context));
|
||||
}
|
||||
|
||||
if(Locale.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Locale", Locale.Get(context));
|
||||
}
|
||||
|
||||
if(EnableAllPrivileges.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("EnableAllPrivileges", EnableAllPrivileges.Get(context));
|
||||
}
|
||||
|
||||
if(Authority.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Authority", Authority.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(ThrottleLimit.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ThrottleLimit", ThrottleLimit.Get(context));
|
||||
}
|
||||
|
||||
if(ComputerName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", ComputerName.Get(context));
|
||||
}
|
||||
|
||||
if(Namespace.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Namespace", Namespace.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,166 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Split-Path command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class SplitPath : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public SplitPath()
|
||||
{
|
||||
this.DisplayName = "Split-Path";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Split-Path"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Qualifier parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Qualifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NoQualifier parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> NoQualifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Parent parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Parent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Leaf parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Leaf { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Resolve parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Resolve { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the IsAbsolute parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> IsAbsolute { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Qualifier.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Qualifier", Qualifier.Get(context));
|
||||
}
|
||||
|
||||
if(NoQualifier.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NoQualifier", NoQualifier.Get(context));
|
||||
}
|
||||
|
||||
if(Parent.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Parent", Parent.Get(context));
|
||||
}
|
||||
|
||||
if(Leaf.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Leaf", Leaf.Get(context));
|
||||
}
|
||||
|
||||
if(Resolve.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Resolve", Resolve.Get(context));
|
||||
}
|
||||
|
||||
if(IsAbsolute.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("IsAbsolute", IsAbsolute.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,226 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Start-Process command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class StartProcess : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public StartProcess()
|
||||
{
|
||||
this.DisplayName = "Start-Process";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Start-Process"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the FilePath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> FilePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ArgumentList parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ArgumentList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the WorkingDirectory parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> WorkingDirectory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LoadUserProfile parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> LoadUserProfile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NoNewWindow parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> NoNewWindow { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the RedirectStandardError parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> RedirectStandardError { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the RedirectStandardInput parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> RedirectStandardInput { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the RedirectStandardOutput parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> RedirectStandardOutput { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Verb parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Verb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the WindowStyle parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Diagnostics.ProcessWindowStyle> WindowStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Wait parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Wait { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the UseNewEnvironment parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> UseNewEnvironment { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(FilePath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("FilePath", FilePath.Get(context));
|
||||
}
|
||||
|
||||
if(ArgumentList.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ArgumentList", ArgumentList.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(WorkingDirectory.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("WorkingDirectory", WorkingDirectory.Get(context));
|
||||
}
|
||||
|
||||
if(LoadUserProfile.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LoadUserProfile", LoadUserProfile.Get(context));
|
||||
}
|
||||
|
||||
if(NoNewWindow.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NoNewWindow", NoNewWindow.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(RedirectStandardError.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("RedirectStandardError", RedirectStandardError.Get(context));
|
||||
}
|
||||
|
||||
if(RedirectStandardInput.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("RedirectStandardInput", RedirectStandardInput.Get(context));
|
||||
}
|
||||
|
||||
if(RedirectStandardOutput.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("RedirectStandardOutput", RedirectStandardOutput.Get(context));
|
||||
}
|
||||
|
||||
if(Verb.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Verb", Verb.Get(context));
|
||||
}
|
||||
|
||||
if(WindowStyle.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("WindowStyle", WindowStyle.Get(context));
|
||||
}
|
||||
|
||||
if(Wait.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Wait", Wait.Get(context));
|
||||
}
|
||||
|
||||
if(UseNewEnvironment.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("UseNewEnvironment", UseNewEnvironment.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Start-Service command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class StartService : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public StartService()
|
||||
{
|
||||
this.DisplayName = "Start-Service";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Start-Service"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.ServiceProcess.ServiceController[]> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ServiceDisplayName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ServiceDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(ServiceDisplayName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Stop-Computer command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class StopComputer : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public StopComputer()
|
||||
{
|
||||
this.DisplayName = "Stop-Computer";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Stop-Computer"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the AsJob parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> AsJob { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the DcomAuthentication parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.AuthenticationLevel> DcomAuthentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the WsmanAuthentication parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> WsmanAuthentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Protocol parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Protocol { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Impersonation parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.ImpersonationLevel> Impersonation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ThrottleLimit parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> ThrottleLimit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(AsJob.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("AsJob", AsJob.Get(context));
|
||||
}
|
||||
|
||||
if(DcomAuthentication.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DcomAuthentication", DcomAuthentication.Get(context));
|
||||
}
|
||||
|
||||
if(WsmanAuthentication.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("WsmanAuthentication", WsmanAuthentication.Get(context));
|
||||
}
|
||||
|
||||
if(Protocol.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Protocol", Protocol.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(Impersonation.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Impersonation", Impersonation.Get(context));
|
||||
}
|
||||
|
||||
if(ThrottleLimit.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ThrottleLimit", ThrottleLimit.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,118 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Stop-Process command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class StopProcess : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public StopProcess()
|
||||
{
|
||||
this.DisplayName = "Stop-Process";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Stop-Process"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ProcessId parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32[]> ProcessId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Diagnostics.Process[]> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(ProcessId.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Id", ProcessId.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Stop-Service command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class StopService : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public StopService()
|
||||
{
|
||||
this.DisplayName = "Stop-Service";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Stop-Service"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NoWait parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> NoWait { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.ServiceProcess.ServiceController[]> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ServiceDisplayName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ServiceDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if(NoWait.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NoWait", NoWait.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(ServiceDisplayName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Suspend-Service command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class SuspendService : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public SuspendService()
|
||||
{
|
||||
this.DisplayName = "Suspend-Service";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Suspend-Service"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.ServiceProcess.ServiceController[]> InputObject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PassThru parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> PassThru { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ServiceDisplayName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ServiceDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
if(PassThru.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PassThru", PassThru.Get(context));
|
||||
}
|
||||
|
||||
if(ServiceDisplayName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DisplayName", ServiceDisplayName.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Test-ComputerSecureChannel command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class TestComputerSecureChannel : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public TestComputerSecureChannel()
|
||||
{
|
||||
this.DisplayName = "Test-ComputerSecureChannel";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Test-ComputerSecureChannel"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Repair parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Repair { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Server parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Server { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Repair.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Repair", Repair.Get(context));
|
||||
}
|
||||
|
||||
if(Server.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Server", Server.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,226 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Test-Connection command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class TestConnection : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public TestConnection()
|
||||
{
|
||||
this.DisplayName = "Test-Connection";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Test-Connection"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the AsJob parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> AsJob { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the DcomAuthentication parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.AuthenticationLevel> DcomAuthentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the WsmanAuthentication parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> WsmanAuthentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Protocol parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Protocol { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the BufferSize parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> BufferSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ComputerName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> ComputerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Count parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Source parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Impersonation parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.ImpersonationLevel> Impersonation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ThrottleLimit parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> ThrottleLimit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the TimeToLive parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> TimeToLive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Delay parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> Delay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Quiet parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Quiet { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(AsJob.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("AsJob", AsJob.Get(context));
|
||||
}
|
||||
|
||||
if(DcomAuthentication.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DcomAuthentication", DcomAuthentication.Get(context));
|
||||
}
|
||||
|
||||
if(WsmanAuthentication.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("WsmanAuthentication", WsmanAuthentication.Get(context));
|
||||
}
|
||||
|
||||
if(Protocol.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Protocol", Protocol.Get(context));
|
||||
}
|
||||
|
||||
if(BufferSize.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("BufferSize", BufferSize.Get(context));
|
||||
}
|
||||
|
||||
if(ComputerName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", ComputerName.Get(context));
|
||||
}
|
||||
|
||||
if(Count.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Count", Count.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(Source.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Source", Source.Get(context));
|
||||
}
|
||||
|
||||
if(Impersonation.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Impersonation", Impersonation.Get(context));
|
||||
}
|
||||
|
||||
if(ThrottleLimit.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ThrottleLimit", ThrottleLimit.Get(context));
|
||||
}
|
||||
|
||||
if(TimeToLive.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("TimeToLive", TimeToLive.Get(context));
|
||||
}
|
||||
|
||||
if(Delay.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Delay", Delay.Get(context));
|
||||
}
|
||||
|
||||
if(Quiet.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Quiet", Quiet.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Test-Path command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class TestPath : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public TestPath()
|
||||
{
|
||||
this.DisplayName = "Test-Path";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Test-Path"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Path parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LiteralPath parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Filter parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Filter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Include parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Include { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Exclude parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Exclude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the PathType parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<Microsoft.PowerShell.Commands.TestPathType> PathType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the IsValid parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> IsValid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Credential parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the OlderThan parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Nullable<System.DateTime>> OlderThan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the NewerThan parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Nullable<System.DateTime>> NewerThan { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(Path.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Path", Path.Get(context));
|
||||
}
|
||||
|
||||
if(LiteralPath.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context));
|
||||
}
|
||||
|
||||
if(Filter.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Filter", Filter.Get(context));
|
||||
}
|
||||
|
||||
if(Include.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Include", Include.Get(context));
|
||||
}
|
||||
|
||||
if(Exclude.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Exclude", Exclude.Get(context));
|
||||
}
|
||||
|
||||
if(PathType.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("PathType", PathType.Get(context));
|
||||
}
|
||||
|
||||
if(IsValid.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("IsValid", IsValid.Get(context));
|
||||
}
|
||||
|
||||
if(Credential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", Credential.Get(context));
|
||||
}
|
||||
|
||||
if(OlderThan.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("OlderThan", OlderThan.Get(context));
|
||||
}
|
||||
|
||||
if(NewerThan.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("NewerThan", NewerThan.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Wait-Process command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class WaitProcess : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public WaitProcess()
|
||||
{
|
||||
this.DisplayName = "Wait-Process";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Wait-Process"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ProcessId parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32[]> ProcessId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Name parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String[]> Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Timeout parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> Timeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the InputObject parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Diagnostics.Process[]> InputObject { get; set; }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(ProcessId.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Id", ProcessId.Get(context));
|
||||
}
|
||||
|
||||
if(Name.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Name", Name.Get(context));
|
||||
}
|
||||
|
||||
if(Timeout.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Timeout", Timeout.Get(context));
|
||||
}
|
||||
|
||||
if(InputObject.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("InputObject", InputObject.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation;
|
||||
using System.Activities;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// Activity to invoke the Microsoft.PowerShell.Management\Write-EventLog command in a Workflow.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
|
||||
public sealed class WriteEventLog : PSRemotingActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public WriteEventLog()
|
||||
{
|
||||
this.DisplayName = "Write-EventLog";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Write-EventLog"; } }
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the LogName parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> LogName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Source parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the EntryType parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Diagnostics.EventLogEntryType> EntryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Category parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int16> Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the EventId parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> EventId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Message parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the RawData parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Byte[]> RawData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Declares that this activity supports its own remoting.
|
||||
/// </summary>
|
||||
protected override bool SupportsCustomRemoting { get { return true; } }
|
||||
|
||||
|
||||
// Module defining this command
|
||||
|
||||
|
||||
// Optional custom code for this activity
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Initialize the arguments
|
||||
|
||||
if(LogName.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("LogName", LogName.Get(context));
|
||||
}
|
||||
|
||||
if(Source.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Source", Source.Get(context));
|
||||
}
|
||||
|
||||
if(EntryType.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("EntryType", EntryType.Get(context));
|
||||
}
|
||||
|
||||
if(Category.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Category", Category.Get(context));
|
||||
}
|
||||
|
||||
if(EventId.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("EventId", EventId.Get(context));
|
||||
}
|
||||
|
||||
if(Message.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Message", Message.Get(context));
|
||||
}
|
||||
|
||||
if(RawData.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("RawData", RawData.Get(context));
|
||||
}
|
||||
|
||||
if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", PSComputerName.Get(context));
|
||||
}
|
||||
|
||||
|
||||
return new ActivityImplementationContext() { PowerShellInstance = invoker };
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,449 +0,0 @@
|
|||
//
|
||||
// Copyright (C) Microsoft. All rights reserved.
|
||||
//
|
||||
using System;
|
||||
using System.Activities;
|
||||
using System.Activities.Validation;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime;
|
||||
using System.Activities.Statements;
|
||||
using System.Management.Automation;
|
||||
using System.Management.Automation.Runspaces;
|
||||
using System.ComponentModel;
|
||||
using Microsoft.PowerShell.Activities;
|
||||
using System.Management.Automation.Tracing;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Microsoft.PowerShell.Management.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// RestartActivityContext
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class RestartActivityContext {
|
||||
/// <summary>
|
||||
/// Indicates whether a self restart is needed.
|
||||
/// </summary>
|
||||
[NonSerialized]
|
||||
internal bool NeedsRestart = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// RestartComputerActivity
|
||||
/// </summary>
|
||||
public sealed class RestartComputer : PSActivity
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the display name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public RestartComputer()
|
||||
{
|
||||
this.DisplayName = "Restart-Computer";
|
||||
}
|
||||
|
||||
private static Tracer _structuredTracer = new Tracer();
|
||||
|
||||
/// <summary>
|
||||
/// If true, them the workflow will not checkpoint and resume after
|
||||
/// the computer is restarted.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public static bool DisableSelfRestart
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fully qualified name of the command invoked by this activity.
|
||||
/// </summary>
|
||||
public override string PSCommandName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "Microsoft.PowerShell.Management\\Restart-Computer";
|
||||
}
|
||||
}
|
||||
|
||||
// Arguments
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Authentication parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
|
||||
public InArgument<System.Management.AuthenticationLevel> DcomAuthentication
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Impersonation parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.ImpersonationLevel> Impersonation
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the WsmanAuthentication parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
|
||||
public InArgument<System.String> WsmanAuthentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Protocol parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.String> Protocol { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The computer name to invoke this activity on.
|
||||
/// </summary>
|
||||
[ConnectivityCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<string[]> PSComputerName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the credential to use in the remote connection.
|
||||
/// </summary>
|
||||
[ConnectivityCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<PSCredential> PSCredential
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Force parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Force
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the ThrottleLimit parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> ThrottleLimit
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Wait parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Management.Automation.SwitchParameter> Wait
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Timeout parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int32> Timeout
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the For parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<Microsoft.PowerShell.Commands.WaitForServiceTypes> For
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides access to the Delay parameter.
|
||||
/// </summary>
|
||||
[ParameterSpecificCategory]
|
||||
[DefaultValue(null)]
|
||||
public InArgument<System.Int16> Delay
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
private Variable<RestartActivityContext> restartActivityContext = new Variable<RestartActivityContext>("RestartActivityContext");
|
||||
|
||||
private readonly PSPersist persistActivity = new PSPersist();
|
||||
|
||||
/// <summary>
|
||||
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
|
||||
/// </summary>
|
||||
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
|
||||
/// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
|
||||
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
|
||||
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
|
||||
{
|
||||
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
|
||||
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
|
||||
|
||||
// Get the host default values we should use if no explicit parameter was provided.
|
||||
var hostExtension = context.GetExtension<HostParameterDefaults>();
|
||||
Dictionary<string, object> parameterDefaults = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
|
||||
if (hostExtension != null)
|
||||
{
|
||||
Dictionary<string, object> incomingArguments = hostExtension.Parameters;
|
||||
foreach (KeyValuePair<string, object> parameterDefault in incomingArguments)
|
||||
{
|
||||
parameterDefaults[parameterDefault.Key] = parameterDefault.Value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (DcomAuthentication.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("DcomAuthentication", DcomAuthentication.Get(context));
|
||||
|
||||
}
|
||||
|
||||
if (Impersonation.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Impersonation", Impersonation.Get(context));
|
||||
}
|
||||
|
||||
// See if the DCOM protocol is to be used
|
||||
bool usingDcom = false;
|
||||
if (Protocol.Expression != null)
|
||||
{
|
||||
string protocol = Protocol.Get(context);
|
||||
targetCommand.AddParameter("Protocol", protocol);
|
||||
if (string.Equals(protocol, "DCOM", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
usingDcom = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the WSMan authentication mechanism to use. If no expression was specified,
|
||||
// and DCOM is not being used, get the default from the host.
|
||||
if (WsmanAuthentication.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("WsmanAuthentication", WsmanAuthentication.Get(context));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!usingDcom)
|
||||
{
|
||||
if (parameterDefaults.ContainsKey("PSAuthentication"))
|
||||
{
|
||||
string authString = parameterDefaults["PSAuthentication"].ToString();
|
||||
// Note: the underlying cmdlet does support NegotiateWithImplicitCredential so it is expected
|
||||
// that passing this in as-is will result in an (appropriate) error being emitted in that case.
|
||||
targetCommand.AddParameter("WsmanAuthentication", authString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Map PSComputerName to the underlying cmdlet name only if the computername is not empty
|
||||
string[] computerName = GetPSComputerName(context);
|
||||
if ((computerName != null) && (computerName.Length != 0))
|
||||
{
|
||||
targetCommand.AddParameter("ComputerName", computerName);
|
||||
}
|
||||
|
||||
// Map PSCredential to credential. If no expression was provided, then use the default.
|
||||
if (PSCredential.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Credential", PSCredential.Get(context));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parameterDefaults.ContainsKey("PSCredential"))
|
||||
{
|
||||
targetCommand.AddParameter("Credential", parameterDefaults["PSCredential"]);
|
||||
}
|
||||
}
|
||||
|
||||
if (Force.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Force", Force.Get(context));
|
||||
}
|
||||
|
||||
if (ThrottleLimit.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("ThrottleLimit", ThrottleLimit.Get(context));
|
||||
}
|
||||
|
||||
// Ignore the -Wait parameter in the self-restart case.
|
||||
if (!IsSelfRestart(context))
|
||||
{
|
||||
if (Wait.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Wait", Wait.Get(context));
|
||||
}
|
||||
|
||||
if (For.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("For", For.Get(context));
|
||||
}
|
||||
|
||||
if (Delay.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Delay", Delay.Get(context));
|
||||
}
|
||||
}
|
||||
|
||||
if (Timeout.Expression != null)
|
||||
{
|
||||
targetCommand.AddParameter("Timeout", Timeout.Get(context));
|
||||
}
|
||||
|
||||
return new ActivityImplementationContext()
|
||||
{
|
||||
PowerShellInstance = invoker
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Execute this command for this activity.
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
protected override void Execute(NativeActivityContext context)
|
||||
{
|
||||
if (!IsSelfRestart(context))
|
||||
{
|
||||
if (_structuredTracer.IsEnabled)
|
||||
{
|
||||
string[] computerNames = new string[] { };
|
||||
computerNames = PSComputerName.Get(context);
|
||||
_structuredTracer.DebugMessage("Executing activity '" + this.DisplayName + "', restarting managed nodes: [" + string.Join(", ", computerNames, ", ") + "]");
|
||||
}
|
||||
base.Execute(context);
|
||||
}
|
||||
else
|
||||
{
|
||||
_structuredTracer.DebugMessage("Executing activity '" + this.DisplayName + "',doing self-restart" );
|
||||
PersistAndRestart(context);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test to see if we're restarting the machine we're running on.
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns>true if we are restarting the local machine.</returns>
|
||||
private bool IsSelfRestart(NativeActivityContext context)
|
||||
{
|
||||
string[] computerName = GetPSComputerName(context);
|
||||
|
||||
if (computerName == null || computerName.Length == 0)
|
||||
return true;
|
||||
|
||||
// NOTE: this is known to be problematic as the number of ways of saying "me" in the various
|
||||
// protocols is potentially unbounded. This should be reviewed periodically.
|
||||
foreach (string s in computerName)
|
||||
{
|
||||
string cn = s.Trim();
|
||||
if (string.Equals(cn, "localhost", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(cn, "127.0.0.1", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(cn, "0:0:0:0:0:0:0:1", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(cn, "::1", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(cn, ".", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(cn, Environment.MachineName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the PSComputerName argument from the context
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
private string[] GetPSComputerName(NativeActivityContext context)
|
||||
{
|
||||
if (PSComputerName.Expression != null)
|
||||
{
|
||||
return PSComputerName.Get(context);
|
||||
}
|
||||
|
||||
// Retrieve our host overrides
|
||||
var hostValues = context.GetExtension<HostParameterDefaults>();
|
||||
|
||||
if (hostValues != null)
|
||||
{
|
||||
Dictionary<string, object> incomingArguments = hostValues.Parameters;
|
||||
if (incomingArguments.ContainsKey("PSComputerName"))
|
||||
{
|
||||
return incomingArguments["PSComputerName"] as string[];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CacheMetadata
|
||||
/// </summary>
|
||||
/// <param name="metadata"></param>
|
||||
protected override void CacheMetadata(NativeActivityMetadata metadata)
|
||||
{
|
||||
base.CacheMetadata(metadata);
|
||||
metadata.AddImplementationChild(this.persistActivity);
|
||||
metadata.AddImplementationVariable(restartActivityContext);
|
||||
}
|
||||
|
||||
private void PersistAndRestart(NativeActivityContext executionContext)
|
||||
{
|
||||
if (DisableSelfRestart)
|
||||
{
|
||||
_structuredTracer.DebugMessage("Executing activity '" + this.DisplayName + "', resume of workflow after restart was disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
_structuredTracer.DebugMessage("Executing activity '" + this.DisplayName + "' scheduling persistence for workflow resumption after restart.");
|
||||
RestartActivityContext c = new RestartActivityContext();
|
||||
c.NeedsRestart = true;
|
||||
restartActivityContext.Set(executionContext, c);
|
||||
|
||||
executionContext.ScheduleActivity(persistActivity, SelfRestart);
|
||||
}
|
||||
|
||||
private void SelfRestart(NativeActivityContext context, ActivityInstance target)
|
||||
{
|
||||
RestartActivityContext restartContext = restartActivityContext.Get(context);
|
||||
if (!restartContext.NeedsRestart)
|
||||
{
|
||||
_structuredTracer.DebugMessage("Executing activity '" + this.DisplayName + "', local machine (" + Environment.MachineName + ") has been restarted.");
|
||||
return;
|
||||
}
|
||||
|
||||
_structuredTracer.DebugMessage("Executing activity '" + this.DisplayName + "', local machine (" + Environment.MachineName + ") is self-restarting");
|
||||
base.Execute(context);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue