diff --git a/src/Microsoft.PowerShell.Management.Activities/AssemblyInfo.cs b/src/Microsoft.PowerShell.Management.Activities/AssemblyInfo.cs new file mode 100644 index 000000000..a549bb415 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/AssemblyInfo.cs @@ -0,0 +1,18 @@ +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")] + diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/AddComputerActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/AddComputerActivity.cs new file mode 100644 index 000000000..bc2bcefed --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/AddComputerActivity.cs @@ -0,0 +1,224 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Add-Computer command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class AddComputer : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public AddComputer() + { + this.DisplayName = "Add-Computer"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Add-Computer"; } } + + // Arguments + + /// + /// Provides access to the LocalCredential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LocalCredential { get; set; } + + /// + /// Provides access to the UnjoinDomainCredential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UnjoinDomainCredential { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the DomainName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument DomainName { get; set; } + + /// + /// Provides access to the OUPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument OUPath { get; set; } + + /// + /// Provides access to the Server parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Server { get; set; } + + /// + /// Provides access to the Unsecure parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Unsecure { get; set; } + + /// + /// Provides access to the Options parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Options { get; set; } + + /// + /// Provides access to the WorkgroupName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument WorkgroupName { get; set; } + + /// + /// Provides access to the Restart parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Restart { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the NewName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NewName { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/AddContentActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/AddContentActivity.cs new file mode 100644 index 000000000..4309f9c7b --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/AddContentActivity.cs @@ -0,0 +1,202 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Add-Content command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class AddContent : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public AddContent() + { + this.DisplayName = "Add-Content"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Add-Content"; } } + + // Arguments + + /// + /// Provides access to the Value parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Value { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the NoNewline parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NoNewline { get; set; } + + /// + /// Provides access to the Encoding parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Encoding { get; set; } + + /// + /// Provides access to the Stream parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Stream { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/CheckpointComputerActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/CheckpointComputerActivity.cs new file mode 100644 index 000000000..25733d19f --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/CheckpointComputerActivity.cs @@ -0,0 +1,82 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Checkpoint-Computer command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class CheckpointComputer : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public CheckpointComputer() + { + this.DisplayName = "Checkpoint-Computer"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Checkpoint-Computer"; } } + + // Arguments + + /// + /// Provides access to the Description parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Description { get; set; } + + /// + /// Provides access to the RestorePointType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument RestorePointType { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/ClearContentActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearContentActivity.cs new file mode 100644 index 000000000..25bfd4c28 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearContentActivity.cs @@ -0,0 +1,154 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Clear-Content command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ClearContent : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ClearContent() + { + this.DisplayName = "Clear-Content"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-Content"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Stream parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Stream { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/ClearEventLogActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearEventLogActivity.cs new file mode 100644 index 000000000..03907da52 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearEventLogActivity.cs @@ -0,0 +1,80 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Clear-EventLog command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ClearEventLog : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ClearEventLog() + { + this.DisplayName = "Clear-EventLog"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-EventLog"; } } + + // Arguments + + /// + /// Provides access to the LogName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LogName { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/ClearItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearItemActivity.cs new file mode 100644 index 000000000..ee45d432f --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearItemActivity.cs @@ -0,0 +1,142 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Clear-Item command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ClearItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ClearItem() + { + this.DisplayName = "Clear-Item"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-Item"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/ClearItemPropertyActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearItemPropertyActivity.cs new file mode 100644 index 000000000..c1d3541cd --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearItemPropertyActivity.cs @@ -0,0 +1,166 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Clear-ItemProperty command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ClearItemProperty : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ClearItemProperty() + { + this.DisplayName = "Clear-ItemProperty"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-ItemProperty"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/ClearRecycleBinActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearRecycleBinActivity.cs new file mode 100644 index 000000000..0811424f4 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/ClearRecycleBinActivity.cs @@ -0,0 +1,82 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Clear-RecycleBin command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ClearRecycleBin : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ClearRecycleBin() + { + this.DisplayName = "Clear-RecycleBin"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Clear-RecycleBin"; } } + + // Arguments + + /// + /// Provides access to the DriveLetter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument DriveLetter { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/ConvertPathActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/ConvertPathActivity.cs new file mode 100644 index 000000000..3ea544b05 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/ConvertPathActivity.cs @@ -0,0 +1,82 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Convert-Path command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ConvertPath : PSActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ConvertPath() + { + this.DisplayName = "Convert-Path"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Convert-Path"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/CopyItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/CopyItemActivity.cs new file mode 100644 index 000000000..eb8daba90 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/CopyItemActivity.cs @@ -0,0 +1,214 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Copy-Item command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class CopyItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public CopyItem() + { + this.DisplayName = "Copy-Item"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Copy-Item"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Destination parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Destination { get; set; } + + /// + /// Provides access to the Container parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Container { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Recurse parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Recurse { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the FromSession parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument FromSession { get; set; } + + /// + /// Provides access to the ToSession parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ToSession { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/CopyItemPropertyActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/CopyItemPropertyActivity.cs new file mode 100644 index 000000000..954bd0690 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/CopyItemPropertyActivity.cs @@ -0,0 +1,178 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Copy-ItemProperty command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class CopyItemProperty : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public CopyItemProperty() + { + this.DisplayName = "Copy-ItemProperty"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Copy-ItemProperty"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the Destination parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Destination { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/DisableComputerRestoreActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/DisableComputerRestoreActivity.cs new file mode 100644 index 000000000..2354d577c --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/DisableComputerRestoreActivity.cs @@ -0,0 +1,70 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Disable-ComputerRestore command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class DisableComputerRestore : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public DisableComputerRestore() + { + this.DisplayName = "Disable-ComputerRestore"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Disable-ComputerRestore"; } } + + // Arguments + + /// + /// Provides access to the Drive parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Drive { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/EnableComputerRestoreActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/EnableComputerRestoreActivity.cs new file mode 100644 index 000000000..737f61109 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/EnableComputerRestoreActivity.cs @@ -0,0 +1,70 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Enable-ComputerRestore command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class EnableComputerRestore : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public EnableComputerRestore() + { + this.DisplayName = "Enable-ComputerRestore"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Enable-ComputerRestore"; } } + + // Arguments + + /// + /// Provides access to the Drive parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Drive { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetChildItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetChildItemActivity.cs new file mode 100644 index 000000000..22e295b17 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetChildItemActivity.cs @@ -0,0 +1,238 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-ChildItem command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetChildItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetChildItem() + { + this.DisplayName = "Get-ChildItem"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-ChildItem"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Recurse parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Recurse { get; set; } + + /// + /// Provides access to the Depth parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Depth { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the Attributes parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument> Attributes { get; set; } + + /// + /// Provides access to the Directory parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Directory { get; set; } + + /// + /// Provides access to the File parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument File { get; set; } + + /// + /// Provides access to the Hidden parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Hidden { get; set; } + + /// + /// Provides access to the ReadOnly parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ReadOnly { get; set; } + + /// + /// Provides access to the System parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument System { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetComputerRestorePointActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetComputerRestorePointActivity.cs new file mode 100644 index 000000000..94c91f352 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetComputerRestorePointActivity.cs @@ -0,0 +1,82 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-ComputerRestorePoint command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetComputerRestorePoint : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetComputerRestorePoint() + { + this.DisplayName = "Get-ComputerRestorePoint"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-ComputerRestorePoint"; } } + + // Arguments + + /// + /// Provides access to the RestorePoint parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument RestorePoint { get; set; } + + /// + /// Provides access to the LastStatus parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LastStatus { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetContentActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetContentActivity.cs new file mode 100644 index 000000000..c60b5d693 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetContentActivity.cs @@ -0,0 +1,238 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-Content command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetContent : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetContent() + { + this.DisplayName = "Get-Content"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Content"; } } + + // Arguments + + /// + /// Provides access to the ReadCount parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ReadCount { get; set; } + + /// + /// Provides access to the TotalCount parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument TotalCount { get; set; } + + /// + /// Provides access to the Tail parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Tail { get; set; } + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Delimiter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Delimiter { get; set; } + + /// + /// Provides access to the Wait parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Wait { get; set; } + + /// + /// Provides access to the Raw parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Raw { get; set; } + + /// + /// Provides access to the Encoding parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Encoding { get; set; } + + /// + /// Provides access to the Stream parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Stream { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetEventLogActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetEventLogActivity.cs new file mode 100644 index 000000000..f52caced6 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetEventLogActivity.cs @@ -0,0 +1,224 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-EventLog command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetEventLog : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetEventLog() + { + this.DisplayName = "Get-EventLog"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-EventLog"; } } + + // Arguments + + /// + /// Provides access to the LogName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LogName { get; set; } + + /// + /// Provides access to the Newest parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Newest { get; set; } + + /// + /// Provides access to the After parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument After { get; set; } + + /// + /// Provides access to the Before parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Before { get; set; } + + /// + /// Provides access to the UserName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UserName { get; set; } + + /// + /// Provides access to the InstanceId parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InstanceId { get; set; } + + /// + /// Provides access to the Index parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Index { get; set; } + + /// + /// Provides access to the EntryType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument EntryType { get; set; } + + /// + /// Provides access to the Source parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Source { get; set; } + + /// + /// Provides access to the Message parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Message { get; set; } + + /// + /// Provides access to the AsBaseObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument AsBaseObject { get; set; } + + /// + /// Provides access to the List parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument List { get; set; } + + /// + /// Provides access to the AsString parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument AsString { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetHotFixActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetHotFixActivity.cs new file mode 100644 index 000000000..5316219bd --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetHotFixActivity.cs @@ -0,0 +1,104 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-HotFix command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetHotFix : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetHotFix() + { + this.DisplayName = "Get-HotFix"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-HotFix"; } } + + // Arguments + + /// + /// Provides access to the HotFixId parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument HotFixId { get; set; } + + /// + /// Provides access to the Description parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Description { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetItemActivity.cs new file mode 100644 index 000000000..b111d1256 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetItemActivity.cs @@ -0,0 +1,154 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-Item command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetItem() + { + this.DisplayName = "Get-Item"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Item"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Stream parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Stream { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetItemPropertyActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetItemPropertyActivity.cs new file mode 100644 index 000000000..343500668 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetItemPropertyActivity.cs @@ -0,0 +1,142 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-ItemProperty command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetItemProperty : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetItemProperty() + { + this.DisplayName = "Get-ItemProperty"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-ItemProperty"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetItemPropertyValueActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetItemPropertyValueActivity.cs new file mode 100644 index 000000000..4319a4ce9 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetItemPropertyValueActivity.cs @@ -0,0 +1,142 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-ItemPropertyValue command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetItemPropertyValue : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetItemPropertyValue() + { + this.DisplayName = "Get-ItemPropertyValue"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-ItemPropertyValue"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetLocationActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetLocationActivity.cs new file mode 100644 index 000000000..a49d517e0 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetLocationActivity.cs @@ -0,0 +1,106 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-Location command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetLocation : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetLocation() + { + this.DisplayName = "Get-Location"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Location"; } } + + // Arguments + + /// + /// Provides access to the PSProvider parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PSProvider { get; set; } + + /// + /// Provides access to the PSDrive parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PSDrive { get; set; } + + /// + /// Provides access to the Stack parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Stack { get; set; } + + /// + /// Provides access to the StackName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument StackName { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetPSDriveActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetPSDriveActivity.cs new file mode 100644 index 000000000..027130f0c --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetPSDriveActivity.cs @@ -0,0 +1,106 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-PSDrive command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetPSDrive : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetPSDrive() + { + this.DisplayName = "Get-PSDrive"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-PSDrive"; } } + + // Arguments + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the LiteralName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralName { get; set; } + + /// + /// Provides access to the Scope parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Scope { get; set; } + + /// + /// Provides access to the PSProvider parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PSProvider { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetPSProviderActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetPSProviderActivity.cs new file mode 100644 index 000000000..0b838e24d --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetPSProviderActivity.cs @@ -0,0 +1,70 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-PSProvider command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetPSProvider : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetPSProvider() + { + this.DisplayName = "Get-PSProvider"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-PSProvider"; } } + + // Arguments + + /// + /// Provides access to the PSProvider parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PSProvider { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetProcessActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetProcessActivity.cs new file mode 100644 index 000000000..0206a88f2 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetProcessActivity.cs @@ -0,0 +1,140 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-Process command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetProcess : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetProcess() + { + this.DisplayName = "Get-Process"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Process"; } } + + // Arguments + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the ProcessId parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ProcessId { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the IncludeUserName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument IncludeUserName { get; set; } + + /// + /// Provides access to the Module parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Module { get; set; } + + /// + /// Provides access to the FileVersionInfo parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument FileVersionInfo { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/GetServiceActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/GetServiceActivity.cs new file mode 100644 index 000000000..a399f9dde --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/GetServiceActivity.cs @@ -0,0 +1,152 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Get-Service command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetService : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetService() + { + this.DisplayName = "Get-Service"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Get-Service"; } } + + // Arguments + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the DependentServices parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument DependentServices { get; set; } + + /// + /// Provides access to the RequiredServices parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument RequiredServices { get; set; } + + /// + /// Provides access to the ServiceDisplayName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ServiceDisplayName { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/InvokeItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/InvokeItemActivity.cs new file mode 100644 index 000000000..a50004344 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/InvokeItemActivity.cs @@ -0,0 +1,130 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Invoke-Item command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class InvokeItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public InvokeItem() + { + this.DisplayName = "Invoke-Item"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Invoke-Item"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/JoinPathActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/JoinPathActivity.cs new file mode 100644 index 000000000..87d56b76a --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/JoinPathActivity.cs @@ -0,0 +1,106 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Join-Path command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class JoinPath : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public JoinPath() + { + this.DisplayName = "Join-Path"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Join-Path"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the ChildPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ChildPath { get; set; } + + /// + /// Provides access to the Resolve parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Resolve { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/LimitEventLogActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/LimitEventLogActivity.cs new file mode 100644 index 000000000..bdcddfa86 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/LimitEventLogActivity.cs @@ -0,0 +1,116 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Limit-EventLog command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class LimitEventLog : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public LimitEventLog() + { + this.DisplayName = "Limit-EventLog"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Limit-EventLog"; } } + + // Arguments + + /// + /// Provides access to the LogName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LogName { get; set; } + + /// + /// Provides access to the RetentionDays parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument RetentionDays { get; set; } + + /// + /// Provides access to the OverflowAction parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument OverflowAction { get; set; } + + /// + /// Provides access to the MaximumSize parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument MaximumSize { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/MoveItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/MoveItemActivity.cs new file mode 100644 index 000000000..9d78f1e52 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/MoveItemActivity.cs @@ -0,0 +1,166 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Move-Item command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class MoveItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public MoveItem() + { + this.DisplayName = "Move-Item"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Move-Item"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Destination parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Destination { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/MoveItemPropertyActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/MoveItemPropertyActivity.cs new file mode 100644 index 000000000..0eca75e5a --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/MoveItemPropertyActivity.cs @@ -0,0 +1,178 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Move-ItemProperty command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class MoveItemProperty : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public MoveItemProperty() + { + this.DisplayName = "Move-ItemProperty"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Move-ItemProperty"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the Destination parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Destination { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/NewEventLogActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/NewEventLogActivity.cs new file mode 100644 index 000000000..905cf9473 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/NewEventLogActivity.cs @@ -0,0 +1,128 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\New-EventLog command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class NewEventLog : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public NewEventLog() + { + this.DisplayName = "New-EventLog"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-EventLog"; } } + + // Arguments + + /// + /// Provides access to the CategoryResourceFile parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument CategoryResourceFile { get; set; } + + /// + /// Provides access to the LogName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LogName { get; set; } + + /// + /// Provides access to the MessageResourceFile parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument MessageResourceFile { get; set; } + + /// + /// Provides access to the ParameterResourceFile parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ParameterResourceFile { get; set; } + + /// + /// Provides access to the Source parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Source { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/NewItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/NewItemActivity.cs new file mode 100644 index 000000000..20c436e48 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/NewItemActivity.cs @@ -0,0 +1,130 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\New-Item command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class NewItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public NewItem() + { + this.DisplayName = "New-Item"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-Item"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the ItemType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ItemType { get; set; } + + /// + /// Provides access to the Value parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Value { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/NewItemPropertyActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/NewItemPropertyActivity.cs new file mode 100644 index 000000000..74560c380 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/NewItemPropertyActivity.cs @@ -0,0 +1,178 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\New-ItemProperty command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class NewItemProperty : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public NewItemProperty() + { + this.DisplayName = "New-ItemProperty"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-ItemProperty"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the PropertyType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PropertyType { get; set; } + + /// + /// Provides access to the Value parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Value { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/NewServiceActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/NewServiceActivity.cs new file mode 100644 index 000000000..20d2fe9af --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/NewServiceActivity.cs @@ -0,0 +1,142 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\New-Service command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class NewService : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public NewService() + { + this.DisplayName = "New-Service"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-Service"; } } + + // Arguments + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the BinaryPathName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument BinaryPathName { get; set; } + + /// + /// Provides access to the ServiceDisplayName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ServiceDisplayName { get; set; } + + /// + /// Provides access to the Description parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Description { get; set; } + + /// + /// Provides access to the StartupType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument StartupType { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the DependsOn parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument DependsOn { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/NewWebServiceProxyActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/NewWebServiceProxyActivity.cs new file mode 100644 index 000000000..42bbeaa02 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/NewWebServiceProxyActivity.cs @@ -0,0 +1,118 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\New-WebServiceProxy command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class NewWebServiceProxy : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public NewWebServiceProxy() + { + this.DisplayName = "New-WebServiceProxy"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\New-WebServiceProxy"; } } + + // Arguments + + /// + /// Provides access to the Uri parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Uri { get; set; } + + /// + /// Provides access to the Class parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Class { get; set; } + + /// + /// Provides access to the Namespace parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Namespace { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the UseDefaultCredential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseDefaultCredential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RegisterWmiEventActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RegisterWmiEventActivity.cs new file mode 100644 index 000000000..d7a601280 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RegisterWmiEventActivity.cs @@ -0,0 +1,202 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Register-WmiEvent command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RegisterWmiEvent : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RegisterWmiEvent() + { + this.DisplayName = "Register-WmiEvent"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Register-WmiEvent"; } } + + // Arguments + + /// + /// Provides access to the Namespace parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Namespace { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the Class parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Class { get; set; } + + /// + /// Provides access to the Query parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Query { get; set; } + + /// + /// Provides access to the Timeout parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Timeout { get; set; } + + /// + /// Provides access to the SourceIdentifier parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SourceIdentifier { get; set; } + + /// + /// Provides access to the Action parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Action { get; set; } + + /// + /// Provides access to the MessageData parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument MessageData { get; set; } + + /// + /// Provides access to the SupportEvent parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SupportEvent { get; set; } + + /// + /// Provides access to the Forward parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Forward { get; set; } + + /// + /// Provides access to the MaxTriggerCount parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument MaxTriggerCount { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveComputerActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveComputerActivity.cs new file mode 100644 index 000000000..cac6b0c10 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveComputerActivity.cs @@ -0,0 +1,140 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Remove-Computer command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RemoveComputer : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RemoveComputer() + { + this.DisplayName = "Remove-Computer"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-Computer"; } } + + // Arguments + + /// + /// Provides access to the UnjoinDomainCredential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UnjoinDomainCredential { get; set; } + + /// + /// Provides access to the LocalCredential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LocalCredential { get; set; } + + /// + /// Provides access to the Restart parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Restart { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the WorkgroupName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument WorkgroupName { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveEventLogActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveEventLogActivity.cs new file mode 100644 index 000000000..5c209e7f0 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveEventLogActivity.cs @@ -0,0 +1,92 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Remove-EventLog command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RemoveEventLog : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RemoveEventLog() + { + this.DisplayName = "Remove-EventLog"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-EventLog"; } } + + // Arguments + + /// + /// Provides access to the LogName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LogName { get; set; } + + /// + /// Provides access to the Source parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Source { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveItemActivity.cs new file mode 100644 index 000000000..75a503b88 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveItemActivity.cs @@ -0,0 +1,166 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Remove-Item command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RemoveItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RemoveItem() + { + this.DisplayName = "Remove-Item"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-Item"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Recurse parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Recurse { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Stream parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Stream { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveItemPropertyActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveItemPropertyActivity.cs new file mode 100644 index 000000000..9cc4aa9b1 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveItemPropertyActivity.cs @@ -0,0 +1,154 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Remove-ItemProperty command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RemoveItemProperty : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RemoveItemProperty() + { + this.DisplayName = "Remove-ItemProperty"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-ItemProperty"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveWmiObjectActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveWmiObjectActivity.cs new file mode 100644 index 000000000..8d1df3f41 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RemoveWmiObjectActivity.cs @@ -0,0 +1,214 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Remove-WmiObject command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RemoveWmiObject : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RemoveWmiObject() + { + this.DisplayName = "Remove-WmiObject"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Remove-WmiObject"; } } + + // Arguments + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the Class parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Class { get; set; } + + /// + /// Provides access to the AsJob parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument AsJob { get; set; } + + /// + /// Provides access to the Impersonation parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Impersonation { get; set; } + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authentication { get; set; } + + /// + /// Provides access to the Locale parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Locale { get; set; } + + /// + /// Provides access to the EnableAllPrivileges parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument EnableAllPrivileges { get; set; } + + /// + /// Provides access to the Authority parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authority { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the ThrottleLimit parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ThrottleLimit { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the Namespace parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Namespace { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RenameComputerActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RenameComputerActivity.cs new file mode 100644 index 000000000..e38a69696 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RenameComputerActivity.cs @@ -0,0 +1,164 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Rename-Computer command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RenameComputer : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RenameComputer() + { + this.DisplayName = "Rename-Computer"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Rename-Computer"; } } + + // Arguments + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the DomainCredential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument DomainCredential { get; set; } + + /// + /// Provides access to the LocalCredential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LocalCredential { get; set; } + + /// + /// Provides access to the NewName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NewName { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Restart parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Restart { get; set; } + + /// + /// Provides access to the WsmanAuthentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument WsmanAuthentication { get; set; } + + /// + /// Provides access to the Protocol parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Protocol { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RenameItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RenameItemActivity.cs new file mode 100644 index 000000000..ee7fda80f --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RenameItemActivity.cs @@ -0,0 +1,130 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Rename-Item command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RenameItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RenameItem() + { + this.DisplayName = "Rename-Item"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Rename-Item"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the NewName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NewName { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RenameItemPropertyActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RenameItemPropertyActivity.cs new file mode 100644 index 000000000..e5eed7bb5 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RenameItemPropertyActivity.cs @@ -0,0 +1,178 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Rename-ItemProperty command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RenameItemProperty : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RenameItemProperty() + { + this.DisplayName = "Rename-ItemProperty"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Rename-ItemProperty"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the NewName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NewName { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/ResetComputerMachinePasswordActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/ResetComputerMachinePasswordActivity.cs new file mode 100644 index 000000000..ccf9b0747 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/ResetComputerMachinePasswordActivity.cs @@ -0,0 +1,82 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Reset-ComputerMachinePassword command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ResetComputerMachinePassword : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ResetComputerMachinePassword() + { + this.DisplayName = "Reset-ComputerMachinePassword"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Reset-ComputerMachinePassword"; } } + + // Arguments + + /// + /// Provides access to the Server parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Server { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/ResolvePathActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/ResolvePathActivity.cs new file mode 100644 index 000000000..3f39ba16d --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/ResolvePathActivity.cs @@ -0,0 +1,106 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Resolve-Path command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ResolvePath : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ResolvePath() + { + this.DisplayName = "Resolve-Path"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Resolve-Path"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Relative parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Relative { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RestartServiceActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RestartServiceActivity.cs new file mode 100644 index 000000000..c1cb89f3e --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RestartServiceActivity.cs @@ -0,0 +1,142 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Restart-Service command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RestartService : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RestartService() + { + this.DisplayName = "Restart-Service"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Restart-Service"; } } + + // Arguments + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the ServiceDisplayName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ServiceDisplayName { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/RestoreComputerActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/RestoreComputerActivity.cs new file mode 100644 index 000000000..e3854afd0 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/RestoreComputerActivity.cs @@ -0,0 +1,70 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Restore-Computer command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RestoreComputer : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RestoreComputer() + { + this.DisplayName = "Restore-Computer"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Restore-Computer"; } } + + // Arguments + + /// + /// Provides access to the RestorePoint parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument RestorePoint { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/ResumeServiceActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/ResumeServiceActivity.cs new file mode 100644 index 000000000..d9ab14dad --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/ResumeServiceActivity.cs @@ -0,0 +1,130 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Resume-Service command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ResumeService : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ResumeService() + { + this.DisplayName = "Resume-Service"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Resume-Service"; } } + + // Arguments + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the ServiceDisplayName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ServiceDisplayName { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/SetContentActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/SetContentActivity.cs new file mode 100644 index 000000000..d3653d19f --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/SetContentActivity.cs @@ -0,0 +1,202 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Set-Content command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class SetContent : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public SetContent() + { + this.DisplayName = "Set-Content"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-Content"; } } + + // Arguments + + /// + /// Provides access to the Value parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Value { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the NoNewline parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NoNewline { get; set; } + + /// + /// Provides access to the Encoding parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Encoding { get; set; } + + /// + /// Provides access to the Stream parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Stream { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/SetItemActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/SetItemActivity.cs new file mode 100644 index 000000000..427d282ee --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/SetItemActivity.cs @@ -0,0 +1,166 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Set-Item command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class SetItem : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public SetItem() + { + this.DisplayName = "Set-Item"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-Item"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Value parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Value { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/SetItemPropertyActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/SetItemPropertyActivity.cs new file mode 100644 index 000000000..f5e83cb85 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/SetItemPropertyActivity.cs @@ -0,0 +1,190 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Set-ItemProperty command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class SetItemProperty : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public SetItemProperty() + { + this.DisplayName = "Set-ItemProperty"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-ItemProperty"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the Value parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Value { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/SetServiceActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/SetServiceActivity.cs new file mode 100644 index 000000000..8108b75dd --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/SetServiceActivity.cs @@ -0,0 +1,152 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Set-Service command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class SetService : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public SetService() + { + this.DisplayName = "Set-Service"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-Service"; } } + + // Arguments + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the ServiceDisplayName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ServiceDisplayName { get; set; } + + /// + /// Provides access to the Description parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Description { get; set; } + + /// + /// Provides access to the StartupType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument StartupType { get; set; } + + /// + /// Provides access to the Status parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Status { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/SetWmiInstanceActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/SetWmiInstanceActivity.cs new file mode 100644 index 000000000..9655a1dae --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/SetWmiInstanceActivity.cs @@ -0,0 +1,238 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Set-WmiInstance command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class SetWmiInstance : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public SetWmiInstance() + { + this.DisplayName = "Set-WmiInstance"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Set-WmiInstance"; } } + + // Arguments + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the Class parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Class { get; set; } + + /// + /// Provides access to the Arguments parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Arguments { get; set; } + + /// + /// Provides access to the PutType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PutType { get; set; } + + /// + /// Provides access to the AsJob parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument AsJob { get; set; } + + /// + /// Provides access to the Impersonation parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Impersonation { get; set; } + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authentication { get; set; } + + /// + /// Provides access to the Locale parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Locale { get; set; } + + /// + /// Provides access to the EnableAllPrivileges parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument EnableAllPrivileges { get; set; } + + /// + /// Provides access to the Authority parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authority { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the ThrottleLimit parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ThrottleLimit { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the Namespace parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Namespace { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/SplitPathActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/SplitPathActivity.cs new file mode 100644 index 000000000..b3e3488e2 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/SplitPathActivity.cs @@ -0,0 +1,166 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Split-Path command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class SplitPath : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public SplitPath() + { + this.DisplayName = "Split-Path"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Split-Path"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Qualifier parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Qualifier { get; set; } + + /// + /// Provides access to the NoQualifier parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NoQualifier { get; set; } + + /// + /// Provides access to the Parent parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Parent { get; set; } + + /// + /// Provides access to the Leaf parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Leaf { get; set; } + + /// + /// Provides access to the Resolve parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Resolve { get; set; } + + /// + /// Provides access to the IsAbsolute parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument IsAbsolute { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/StartProcessActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/StartProcessActivity.cs new file mode 100644 index 000000000..82c7d09f7 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/StartProcessActivity.cs @@ -0,0 +1,226 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Start-Process command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class StartProcess : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public StartProcess() + { + this.DisplayName = "Start-Process"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Start-Process"; } } + + // Arguments + + /// + /// Provides access to the FilePath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument FilePath { get; set; } + + /// + /// Provides access to the ArgumentList parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ArgumentList { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the WorkingDirectory parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument WorkingDirectory { get; set; } + + /// + /// Provides access to the LoadUserProfile parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LoadUserProfile { get; set; } + + /// + /// Provides access to the NoNewWindow parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NoNewWindow { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the RedirectStandardError parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument RedirectStandardError { get; set; } + + /// + /// Provides access to the RedirectStandardInput parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument RedirectStandardInput { get; set; } + + /// + /// Provides access to the RedirectStandardOutput parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument RedirectStandardOutput { get; set; } + + /// + /// Provides access to the Verb parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Verb { get; set; } + + /// + /// Provides access to the WindowStyle parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument WindowStyle { get; set; } + + /// + /// Provides access to the Wait parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Wait { get; set; } + + /// + /// Provides access to the UseNewEnvironment parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseNewEnvironment { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/StartServiceActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/StartServiceActivity.cs new file mode 100644 index 000000000..99e38ab13 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/StartServiceActivity.cs @@ -0,0 +1,130 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Start-Service command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class StartService : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public StartService() + { + this.DisplayName = "Start-Service"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Start-Service"; } } + + // Arguments + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the ServiceDisplayName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ServiceDisplayName { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/StopComputerActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/StopComputerActivity.cs new file mode 100644 index 000000000..169154971 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/StopComputerActivity.cs @@ -0,0 +1,164 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Stop-Computer command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class StopComputer : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public StopComputer() + { + this.DisplayName = "Stop-Computer"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Stop-Computer"; } } + + // Arguments + + /// + /// Provides access to the AsJob parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument AsJob { get; set; } + + /// + /// Provides access to the DcomAuthentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument DcomAuthentication { get; set; } + + /// + /// Provides access to the WsmanAuthentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument WsmanAuthentication { get; set; } + + /// + /// Provides access to the Protocol parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Protocol { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Impersonation parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Impersonation { get; set; } + + /// + /// Provides access to the ThrottleLimit parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ThrottleLimit { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/StopProcessActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/StopProcessActivity.cs new file mode 100644 index 000000000..dc4fa62f4 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/StopProcessActivity.cs @@ -0,0 +1,118 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Stop-Process command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class StopProcess : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public StopProcess() + { + this.DisplayName = "Stop-Process"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Stop-Process"; } } + + // Arguments + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the ProcessId parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ProcessId { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/StopServiceActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/StopServiceActivity.cs new file mode 100644 index 000000000..c4247603d --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/StopServiceActivity.cs @@ -0,0 +1,154 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Stop-Service command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class StopService : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public StopService() + { + this.DisplayName = "Stop-Service"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Stop-Service"; } } + + // Arguments + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the NoWait parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NoWait { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the ServiceDisplayName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ServiceDisplayName { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/SuspendServiceActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/SuspendServiceActivity.cs new file mode 100644 index 000000000..10e5ed3f8 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/SuspendServiceActivity.cs @@ -0,0 +1,130 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Suspend-Service command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class SuspendService : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public SuspendService() + { + this.DisplayName = "Suspend-Service"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Suspend-Service"; } } + + // Arguments + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + /// + /// Provides access to the PassThru parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PassThru { get; set; } + + /// + /// Provides access to the ServiceDisplayName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ServiceDisplayName { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/TestComputerSecureChannelActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/TestComputerSecureChannelActivity.cs new file mode 100644 index 000000000..b12ee1030 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/TestComputerSecureChannelActivity.cs @@ -0,0 +1,94 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Test-ComputerSecureChannel command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class TestComputerSecureChannel : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public TestComputerSecureChannel() + { + this.DisplayName = "Test-ComputerSecureChannel"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Test-ComputerSecureChannel"; } } + + // Arguments + + /// + /// Provides access to the Repair parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Repair { get; set; } + + /// + /// Provides access to the Server parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Server { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/TestConnectionActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/TestConnectionActivity.cs new file mode 100644 index 000000000..d65e1e32e --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/TestConnectionActivity.cs @@ -0,0 +1,226 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Test-Connection command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class TestConnection : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public TestConnection() + { + this.DisplayName = "Test-Connection"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Test-Connection"; } } + + // Arguments + + /// + /// Provides access to the AsJob parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument AsJob { get; set; } + + /// + /// Provides access to the DcomAuthentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument DcomAuthentication { get; set; } + + /// + /// Provides access to the WsmanAuthentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument WsmanAuthentication { get; set; } + + /// + /// Provides access to the Protocol parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Protocol { get; set; } + + /// + /// Provides access to the BufferSize parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument BufferSize { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the Count parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Count { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Source parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Source { get; set; } + + /// + /// Provides access to the Impersonation parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Impersonation { get; set; } + + /// + /// Provides access to the ThrottleLimit parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ThrottleLimit { get; set; } + + /// + /// Provides access to the TimeToLive parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument TimeToLive { get; set; } + + /// + /// Provides access to the Delay parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Delay { get; set; } + + /// + /// Provides access to the Quiet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Quiet { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/TestPathActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/TestPathActivity.cs new file mode 100644 index 000000000..c2c95b727 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/TestPathActivity.cs @@ -0,0 +1,178 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Test-Path command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class TestPath : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public TestPath() + { + this.DisplayName = "Test-Path"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Test-Path"; } } + + // Arguments + + /// + /// Provides access to the Path parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Path { get; set; } + + /// + /// Provides access to the LiteralPath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LiteralPath { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Include parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Include { get; set; } + + /// + /// Provides access to the Exclude parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Exclude { get; set; } + + /// + /// Provides access to the PathType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument PathType { get; set; } + + /// + /// Provides access to the IsValid parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument IsValid { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the OlderThan parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument> OlderThan { get; set; } + + /// + /// Provides access to the NewerThan parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument> NewerThan { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/WaitProcessActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/WaitProcessActivity.cs new file mode 100644 index 000000000..bb33f96ff --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/WaitProcessActivity.cs @@ -0,0 +1,106 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Wait-Process command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class WaitProcess : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public WaitProcess() + { + this.DisplayName = "Wait-Process"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Wait-Process"; } } + + // Arguments + + /// + /// Provides access to the ProcessId parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ProcessId { get; set; } + + /// + /// Provides access to the Name parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Name { get; set; } + + /// + /// Provides access to the Timeout parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Timeout { get; set; } + + /// + /// Provides access to the InputObject parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument InputObject { get; set; } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/Generated/WriteEventLogActivity.cs b/src/Microsoft.PowerShell.Management.Activities/Generated/WriteEventLogActivity.cs new file mode 100644 index 000000000..1237ca100 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/Generated/WriteEventLogActivity.cs @@ -0,0 +1,152 @@ +// +// 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 +{ + /// + /// Activity to invoke the Microsoft.PowerShell.Management\Write-EventLog command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class WriteEventLog : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public WriteEventLog() + { + this.DisplayName = "Write-EventLog"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.PowerShell.Management\\Write-EventLog"; } } + + // Arguments + + /// + /// Provides access to the LogName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument LogName { get; set; } + + /// + /// Provides access to the Source parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Source { get; set; } + + /// + /// Provides access to the EntryType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument EntryType { get; set; } + + /// + /// Provides access to the Category parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Category { get; set; } + + /// + /// Provides access to the EventId parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument EventId { get; set; } + + /// + /// Provides access to the Message parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Message { get; set; } + + /// + /// Provides access to the RawData parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument RawData { get; set; } + + /// + /// Declares that this activity supports its own remoting. + /// + protected override bool SupportsCustomRemoting { get { return true; } } + + + // Module defining this command + + + // Optional custom code for this activity + + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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 }; + } + } +} diff --git a/src/Microsoft.PowerShell.Management.Activities/RestartComputerActivity.cs b/src/Microsoft.PowerShell.Management.Activities/RestartComputerActivity.cs new file mode 100644 index 000000000..581ad49c9 --- /dev/null +++ b/src/Microsoft.PowerShell.Management.Activities/RestartComputerActivity.cs @@ -0,0 +1,449 @@ +// +// 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 +{ + /// + /// RestartActivityContext + /// + [Serializable] + public class RestartActivityContext { + /// + /// Indicates whether a self restart is needed. + /// + [NonSerialized] + internal bool NeedsRestart = false; + } + + /// + /// RestartComputerActivity + /// + public sealed class RestartComputer : PSActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RestartComputer() + { + this.DisplayName = "Restart-Computer"; + } + + private static Tracer _structuredTracer = new Tracer(); + + /// + /// If true, them the workflow will not checkpoint and resume after + /// the computer is restarted. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public static bool DisableSelfRestart + { + get; + set; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName + { + get + { + return "Microsoft.PowerShell.Management\\Restart-Computer"; + } + } + + // Arguments + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] + public InArgument DcomAuthentication + { + get; + set; + } + + /// + /// Provides access to the Impersonation parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Impersonation + { + get; + set; + } + + /// + /// Provides access to the WsmanAuthentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")] + public InArgument WsmanAuthentication { get; set; } + + /// + /// Provides access to the Protocol parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Protocol { get; set; } + + /// + /// The computer name to invoke this activity on. + /// + [ConnectivityCategory] + [DefaultValue(null)] + public InArgument PSComputerName + { + get; + set; + } + + /// + /// Defines the credential to use in the remote connection. + /// + [ConnectivityCategory] + [DefaultValue(null)] + public InArgument PSCredential + { + get; + set; + } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force + { + get; + set; + } + + /// + /// Provides access to the ThrottleLimit parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ThrottleLimit + { + get; + set; + } + + /// + /// Provides access to the Wait parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Wait + { + get; + set; + } + + /// + /// Provides access to the Timeout parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Timeout + { + get; + set; + } + + /// + /// Provides access to the For parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument For + { + get; + set; + } + + /// + /// Provides access to the Delay parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Delay + { + get; + set; + } + + private Variable restartActivityContext = new Variable("RestartActivityContext"); + + private readonly PSPersist persistActivity = new PSPersist(); + + /// + /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. + /// + /// The NativeActivityContext for the currently running activity. + /// A populated instance of Sytem.Management.Automation.PowerShell + /// The infrastructure takes responsibility for closing and disposing the PowerShell instance returned. + 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(); + Dictionary parameterDefaults = new Dictionary(StringComparer.OrdinalIgnoreCase); + if (hostExtension != null) + { + Dictionary incomingArguments = hostExtension.Parameters; + foreach (KeyValuePair 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 + }; + } + + /// + /// Execute this command for this activity. + /// + /// + 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); + } + } + + /// + /// Test to see if we're restarting the machine we're running on. + /// + /// + /// true if we are restarting the local machine. + 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; + } + + /// + /// Gets the PSComputerName argument from the context + /// + /// + /// + private string[] GetPSComputerName(NativeActivityContext context) + { + if (PSComputerName.Expression != null) + { + return PSComputerName.Get(context); + } + + // Retrieve our host overrides + var hostValues = context.GetExtension(); + + if (hostValues != null) + { + Dictionary incomingArguments = hostValues.Parameters; + if (incomingArguments.ContainsKey("PSComputerName")) + { + return incomingArguments["PSComputerName"] as string[]; + } + } + + return null; + } + + /// + /// CacheMetadata + /// + /// + 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-restaring"); + base.Execute(context); + } + } +}