From 913be6bccfb69f206c170e3f2562b7c263cc0c6a Mon Sep 17 00:00:00 2001 From: PowerShell Team Date: Tue, 21 Jun 2016 15:06:21 -0700 Subject: [PATCH] Add source files for Microsoft.WSMan.Management.Activities --- .../AssemblyInfo.cs | 18 + .../Generated/ConnectWSManActivity.cs | 188 +++++++++++ .../Generated/DisableWSManCredSSPActivity.cs | 70 ++++ .../Generated/DisconnectWSManActivity.cs | 79 +++++ .../Generated/EnableWSManCredSSPActivity.cs | 94 ++++++ .../Generated/GetWSManCredSSPActivity.cs | 58 ++++ .../Generated/GetWSManInstanceActivity.cs | 307 ++++++++++++++++++ .../Generated/InvokeWSManActionActivity.cs | 248 ++++++++++++++ .../Generated/NewWSManInstanceActivity.cs | 236 ++++++++++++++ .../NewWSManSessionOptionActivity.cs | 178 ++++++++++ .../Generated/RemoveWSManInstanceActivity.cs | 212 ++++++++++++ .../Generated/SetWSManInstanceActivity.cs | 259 +++++++++++++++ .../Generated/SetWSManQuickConfigActivity.cs | 94 ++++++ .../Generated/TestWSManActivity.cs | 152 +++++++++ 14 files changed, 2193 insertions(+) create mode 100644 src/Microsoft.WSMan.Management.Activities/AssemblyInfo.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/ConnectWSManActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/DisableWSManCredSSPActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/DisconnectWSManActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/EnableWSManCredSSPActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/GetWSManCredSSPActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/GetWSManInstanceActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/InvokeWSManActionActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/NewWSManInstanceActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/NewWSManSessionOptionActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/RemoveWSManInstanceActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/SetWSManInstanceActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/SetWSManQuickConfigActivity.cs create mode 100644 src/Microsoft.WSMan.Management.Activities/Generated/TestWSManActivity.cs diff --git a/src/Microsoft.WSMan.Management.Activities/AssemblyInfo.cs b/src/Microsoft.WSMan.Management.Activities/AssemblyInfo.cs new file mode 100644 index 0000000000..ade84ca56c --- /dev/null +++ b/src/Microsoft.WSMan.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.WSMan.Management.Activities")] +[assembly: AssemblyDescription("Microsoft.WSMan.Management.Activities")] + +[module: SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant")] + diff --git a/src/Microsoft.WSMan.Management.Activities/Generated/ConnectWSManActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/ConnectWSManActivity.cs new file mode 100644 index 0000000000..bb07e0942e --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/ConnectWSManActivity.cs @@ -0,0 +1,188 @@ +// +// 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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Connect-WSMan command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class ConnectWSMan : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public ConnectWSMan() + { + this.DisplayName = "Connect-WSMan"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Connect-WSMan"; } } + + // Arguments + + /// + /// Provides access to the ApplicationName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ApplicationName { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the ConnectionURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ConnectionURI { get; set; } + + /// + /// Provides access to the OptionSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument OptionSet { get; set; } + + /// + /// Provides access to the Port parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Port { get; set; } + + /// + /// Provides access to the SessionOption parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SessionOption { get; set; } + + /// + /// Provides access to the UseSSL parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseSSL { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authentication { get; set; } + + /// + /// Provides access to the CertificateThumbprint parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument CertificateThumbprint { 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(ApplicationName.Expression != null) + { + targetCommand.AddParameter("ApplicationName", ApplicationName.Get(context)); + } + + if((ComputerName.Expression != null) && (PSRemotingBehavior.Get(context) != RemotingBehavior.Custom)) + { + targetCommand.AddParameter("ComputerName", ComputerName.Get(context)); + } + + if(ConnectionURI.Expression != null) + { + targetCommand.AddParameter("ConnectionURI", ConnectionURI.Get(context)); + } + + if(OptionSet.Expression != null) + { + targetCommand.AddParameter("OptionSet", OptionSet.Get(context)); + } + + if(Port.Expression != null) + { + targetCommand.AddParameter("Port", Port.Get(context)); + } + + if(SessionOption.Expression != null) + { + targetCommand.AddParameter("SessionOption", SessionOption.Get(context)); + } + + if(UseSSL.Expression != null) + { + targetCommand.AddParameter("UseSSL", UseSSL.Get(context)); + } + + if(Credential.Expression != null) + { + targetCommand.AddParameter("Credential", Credential.Get(context)); + } + + if(Authentication.Expression != null) + { + targetCommand.AddParameter("Authentication", Authentication.Get(context)); + } + + if(CertificateThumbprint.Expression != null) + { + targetCommand.AddParameter("CertificateThumbprint", CertificateThumbprint.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.WSMan.Management.Activities/Generated/DisableWSManCredSSPActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/DisableWSManCredSSPActivity.cs new file mode 100644 index 0000000000..02568e52f4 --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/DisableWSManCredSSPActivity.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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Disable-WSManCredSSP command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class DisableWSManCredSSP : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public DisableWSManCredSSP() + { + this.DisplayName = "Disable-WSManCredSSP"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Disable-WSManCredSSP"; } } + + // Arguments + + /// + /// Provides access to the Role parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Role { 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(Role.Expression != null) + { + targetCommand.AddParameter("Role", Role.Get(context)); + } + + + return new ActivityImplementationContext() { PowerShellInstance = invoker }; + } + } +} diff --git a/src/Microsoft.WSMan.Management.Activities/Generated/DisconnectWSManActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/DisconnectWSManActivity.cs new file mode 100644 index 0000000000..29eafca703 --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/DisconnectWSManActivity.cs @@ -0,0 +1,79 @@ +// +// 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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Disconnect-WSMan command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class DisconnectWSMan : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public DisconnectWSMan() + { + this.DisplayName = "Disconnect-WSMan"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Disconnect-WSMan"; } } + + // Arguments + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { 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((ComputerName.Expression != null) && (PSRemotingBehavior.Get(context) != RemotingBehavior.Custom)) + { + targetCommand.AddParameter("ComputerName", ComputerName.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.WSMan.Management.Activities/Generated/EnableWSManCredSSPActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/EnableWSManCredSSPActivity.cs new file mode 100644 index 0000000000..dbfc077102 --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/EnableWSManCredSSPActivity.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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Enable-WSManCredSSP command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class EnableWSManCredSSP : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public EnableWSManCredSSP() + { + this.DisplayName = "Enable-WSManCredSSP"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Enable-WSManCredSSP"; } } + + // Arguments + + /// + /// Provides access to the DelegateComputer parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument DelegateComputer { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the Role parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Role { 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(DelegateComputer.Expression != null) + { + targetCommand.AddParameter("DelegateComputer", DelegateComputer.Get(context)); + } + + if(Force.Expression != null) + { + targetCommand.AddParameter("Force", Force.Get(context)); + } + + if(Role.Expression != null) + { + targetCommand.AddParameter("Role", Role.Get(context)); + } + + + return new ActivityImplementationContext() { PowerShellInstance = invoker }; + } + } +} diff --git a/src/Microsoft.WSMan.Management.Activities/Generated/GetWSManCredSSPActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/GetWSManCredSSPActivity.cs new file mode 100644 index 0000000000..2eedc60a34 --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/GetWSManCredSSPActivity.cs @@ -0,0 +1,58 @@ +// +// 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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Get-WSManCredSSP command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetWSManCredSSP : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetWSManCredSSP() + { + this.DisplayName = "Get-WSManCredSSP"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Get-WSManCredSSP"; } } + + // Arguments + + + // 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 + + + return new ActivityImplementationContext() { PowerShellInstance = invoker }; + } + } +} diff --git a/src/Microsoft.WSMan.Management.Activities/Generated/GetWSManInstanceActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/GetWSManInstanceActivity.cs new file mode 100644 index 0000000000..c8a7f5fc7e --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/GetWSManInstanceActivity.cs @@ -0,0 +1,307 @@ +// +// 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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Get-WSManInstance command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class GetWSManInstance : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public GetWSManInstance() + { + this.DisplayName = "Get-WSManInstance"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Get-WSManInstance"; } } + + // Arguments + + /// + /// Provides access to the ApplicationName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ApplicationName { get; set; } + + /// + /// Provides access to the BasePropertiesOnly parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument BasePropertiesOnly { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the ConnectionURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ConnectionURI { get; set; } + + /// + /// Provides access to the Dialect parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Dialect { get; set; } + + /// + /// Provides access to the Enumerate parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Enumerate { get; set; } + + /// + /// Provides access to the Filter parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Filter { get; set; } + + /// + /// Provides access to the Fragment parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Fragment { get; set; } + + /// + /// Provides access to the OptionSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument OptionSet { get; set; } + + /// + /// Provides access to the Port parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Port { get; set; } + + /// + /// Provides access to the Associations parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Associations { get; set; } + + /// + /// Provides access to the ResourceURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ResourceURI { get; set; } + + /// + /// Provides access to the ReturnType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ReturnType { get; set; } + + /// + /// Provides access to the SelectorSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SelectorSet { get; set; } + + /// + /// Provides access to the SessionOption parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SessionOption { get; set; } + + /// + /// Provides access to the Shallow parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Shallow { get; set; } + + /// + /// Provides access to the UseSSL parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseSSL { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authentication { get; set; } + + /// + /// Provides access to the CertificateThumbprint parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument CertificateThumbprint { 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(ApplicationName.Expression != null) + { + targetCommand.AddParameter("ApplicationName", ApplicationName.Get(context)); + } + + if(BasePropertiesOnly.Expression != null) + { + targetCommand.AddParameter("BasePropertiesOnly", BasePropertiesOnly.Get(context)); + } + + if ((ComputerName.Expression != null) && (PSRemotingBehavior.Get(context) != RemotingBehavior.Custom)) + { + targetCommand.AddParameter("ComputerName", ComputerName.Get(context)); + } + + if(ConnectionURI.Expression != null) + { + targetCommand.AddParameter("ConnectionURI", ConnectionURI.Get(context)); + } + + if(Dialect.Expression != null) + { + targetCommand.AddParameter("Dialect", Dialect.Get(context)); + } + + if(Enumerate.Expression != null) + { + targetCommand.AddParameter("Enumerate", Enumerate.Get(context)); + } + + if(Filter.Expression != null) + { + targetCommand.AddParameter("Filter", Filter.Get(context)); + } + + if(Fragment.Expression != null) + { + targetCommand.AddParameter("Fragment", Fragment.Get(context)); + } + + if(OptionSet.Expression != null) + { + targetCommand.AddParameter("OptionSet", OptionSet.Get(context)); + } + + if(Port.Expression != null) + { + targetCommand.AddParameter("Port", Port.Get(context)); + } + + if(Associations.Expression != null) + { + targetCommand.AddParameter("Associations", Associations.Get(context)); + } + + if(ResourceURI.Expression != null) + { + targetCommand.AddParameter("ResourceURI", ResourceURI.Get(context)); + } + + if(ReturnType.Expression != null) + { + targetCommand.AddParameter("ReturnType", ReturnType.Get(context)); + } + + if(SelectorSet.Expression != null) + { + targetCommand.AddParameter("SelectorSet", SelectorSet.Get(context)); + } + + if(SessionOption.Expression != null) + { + targetCommand.AddParameter("SessionOption", SessionOption.Get(context)); + } + + if(Shallow.Expression != null) + { + targetCommand.AddParameter("Shallow", Shallow.Get(context)); + } + + if(UseSSL.Expression != null) + { + targetCommand.AddParameter("UseSSL", UseSSL.Get(context)); + } + + if(Credential.Expression != null) + { + targetCommand.AddParameter("Credential", Credential.Get(context)); + } + + if(Authentication.Expression != null) + { + targetCommand.AddParameter("Authentication", Authentication.Get(context)); + } + + if(CertificateThumbprint.Expression != null) + { + targetCommand.AddParameter("CertificateThumbprint", CertificateThumbprint.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.WSMan.Management.Activities/Generated/InvokeWSManActionActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/InvokeWSManActionActivity.cs new file mode 100644 index 0000000000..76ea7bf35e --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/InvokeWSManActionActivity.cs @@ -0,0 +1,248 @@ +// +// 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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Invoke-WSManAction command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class InvokeWSManAction : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public InvokeWSManAction() + { + this.DisplayName = "Invoke-WSManAction"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Invoke-WSManAction"; } } + + // Arguments + + /// + /// Provides access to the Action parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Action { get; set; } + + /// + /// Provides access to the ApplicationName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ApplicationName { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the ConnectionURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ConnectionURI { get; set; } + + /// + /// Provides access to the FilePath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument FilePath { get; set; } + + /// + /// Provides access to the OptionSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument OptionSet { get; set; } + + /// + /// Provides access to the Port parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Port { get; set; } + + /// + /// Provides access to the SelectorSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SelectorSet { get; set; } + + /// + /// Provides access to the SessionOption parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SessionOption { get; set; } + + /// + /// Provides access to the UseSSL parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseSSL { get; set; } + + /// + /// Provides access to the ValueSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ValueSet { get; set; } + + /// + /// Provides access to the ResourceURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ResourceURI { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authentication { get; set; } + + /// + /// Provides access to the CertificateThumbprint parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument CertificateThumbprint { 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(Action.Expression != null) + { + targetCommand.AddParameter("Action", Action.Get(context)); + } + + if(ApplicationName.Expression != null) + { + targetCommand.AddParameter("ApplicationName", ApplicationName.Get(context)); + } + + if((ComputerName.Expression != null) && (PSRemotingBehavior.Get(context) != RemotingBehavior.Custom)) + { + targetCommand.AddParameter("ComputerName", ComputerName.Get(context)); + } + + if(ConnectionURI.Expression != null) + { + targetCommand.AddParameter("ConnectionURI", ConnectionURI.Get(context)); + } + + if(FilePath.Expression != null) + { + targetCommand.AddParameter("FilePath", FilePath.Get(context)); + } + + if(OptionSet.Expression != null) + { + targetCommand.AddParameter("OptionSet", OptionSet.Get(context)); + } + + if(Port.Expression != null) + { + targetCommand.AddParameter("Port", Port.Get(context)); + } + + if(SelectorSet.Expression != null) + { + targetCommand.AddParameter("SelectorSet", SelectorSet.Get(context)); + } + + if(SessionOption.Expression != null) + { + targetCommand.AddParameter("SessionOption", SessionOption.Get(context)); + } + + if(UseSSL.Expression != null) + { + targetCommand.AddParameter("UseSSL", UseSSL.Get(context)); + } + + if(ValueSet.Expression != null) + { + targetCommand.AddParameter("ValueSet", ValueSet.Get(context)); + } + + if(ResourceURI.Expression != null) + { + targetCommand.AddParameter("ResourceURI", ResourceURI.Get(context)); + } + + if(Credential.Expression != null) + { + targetCommand.AddParameter("Credential", Credential.Get(context)); + } + + if(Authentication.Expression != null) + { + targetCommand.AddParameter("Authentication", Authentication.Get(context)); + } + + if(CertificateThumbprint.Expression != null) + { + targetCommand.AddParameter("CertificateThumbprint", CertificateThumbprint.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.WSMan.Management.Activities/Generated/NewWSManInstanceActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/NewWSManInstanceActivity.cs new file mode 100644 index 0000000000..2f46f2ce8d --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/NewWSManInstanceActivity.cs @@ -0,0 +1,236 @@ +// +// 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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\New-WSManInstance command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class NewWSManInstance : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public NewWSManInstance() + { + this.DisplayName = "New-WSManInstance"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\New-WSManInstance"; } } + + // Arguments + + /// + /// Provides access to the ApplicationName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ApplicationName { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the ConnectionURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ConnectionURI { get; set; } + + /// + /// Provides access to the FilePath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument FilePath { get; set; } + + /// + /// Provides access to the OptionSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument OptionSet { get; set; } + + /// + /// Provides access to the Port parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Port { get; set; } + + /// + /// Provides access to the ResourceURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ResourceURI { get; set; } + + /// + /// Provides access to the SelectorSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SelectorSet { get; set; } + + /// + /// Provides access to the SessionOption parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SessionOption { get; set; } + + /// + /// Provides access to the UseSSL parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseSSL { get; set; } + + /// + /// Provides access to the ValueSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ValueSet { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authentication { get; set; } + + /// + /// Provides access to the CertificateThumbprint parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument CertificateThumbprint { 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(ApplicationName.Expression != null) + { + targetCommand.AddParameter("ApplicationName", ApplicationName.Get(context)); + } + + if((ComputerName.Expression != null) && (PSRemotingBehavior.Get(context) != RemotingBehavior.Custom)) + { + targetCommand.AddParameter("ComputerName", ComputerName.Get(context)); + } + + if(ConnectionURI.Expression != null) + { + targetCommand.AddParameter("ConnectionURI", ConnectionURI.Get(context)); + } + + if(FilePath.Expression != null) + { + targetCommand.AddParameter("FilePath", FilePath.Get(context)); + } + + if(OptionSet.Expression != null) + { + targetCommand.AddParameter("OptionSet", OptionSet.Get(context)); + } + + if(Port.Expression != null) + { + targetCommand.AddParameter("Port", Port.Get(context)); + } + + if(ResourceURI.Expression != null) + { + targetCommand.AddParameter("ResourceURI", ResourceURI.Get(context)); + } + + if(SelectorSet.Expression != null) + { + targetCommand.AddParameter("SelectorSet", SelectorSet.Get(context)); + } + + if(SessionOption.Expression != null) + { + targetCommand.AddParameter("SessionOption", SessionOption.Get(context)); + } + + if(UseSSL.Expression != null) + { + targetCommand.AddParameter("UseSSL", UseSSL.Get(context)); + } + + if(ValueSet.Expression != null) + { + targetCommand.AddParameter("ValueSet", ValueSet.Get(context)); + } + + if(Credential.Expression != null) + { + targetCommand.AddParameter("Credential", Credential.Get(context)); + } + + if(Authentication.Expression != null) + { + targetCommand.AddParameter("Authentication", Authentication.Get(context)); + } + + if(CertificateThumbprint.Expression != null) + { + targetCommand.AddParameter("CertificateThumbprint", CertificateThumbprint.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.WSMan.Management.Activities/Generated/NewWSManSessionOptionActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/NewWSManSessionOptionActivity.cs new file mode 100644 index 0000000000..0cbeb161f5 --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/NewWSManSessionOptionActivity.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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\New-WSManSessionOption command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class NewWSManSessionOption : PSActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public NewWSManSessionOption() + { + this.DisplayName = "New-WSManSessionOption"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\New-WSManSessionOption"; } } + + // Arguments + + /// + /// Provides access to the ProxyAccessType parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ProxyAccessType { get; set; } + + /// + /// Provides access to the ProxyAuthentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ProxyAuthentication { get; set; } + + /// + /// Provides access to the ProxyCredential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ProxyCredential { get; set; } + + /// + /// Provides access to the SkipCACheck parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SkipCACheck { get; set; } + + /// + /// Provides access to the SkipCNCheck parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SkipCNCheck { get; set; } + + /// + /// Provides access to the SkipRevocationCheck parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SkipRevocationCheck { get; set; } + + /// + /// Provides access to the SPNPort parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SPNPort { get; set; } + + /// + /// Provides access to the OperationTimeout parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument OperationTimeout { get; set; } + + /// + /// Provides access to the NoEncryption parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument NoEncryption { get; set; } + + /// + /// Provides access to the UseUTF16 parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseUTF16 { 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(ProxyAccessType.Expression != null) + { + targetCommand.AddParameter("ProxyAccessType", ProxyAccessType.Get(context)); + } + + if(ProxyAuthentication.Expression != null) + { + targetCommand.AddParameter("ProxyAuthentication", ProxyAuthentication.Get(context)); + } + + if(ProxyCredential.Expression != null) + { + targetCommand.AddParameter("ProxyCredential", ProxyCredential.Get(context)); + } + + if(SkipCACheck.Expression != null) + { + targetCommand.AddParameter("SkipCACheck", SkipCACheck.Get(context)); + } + + if(SkipCNCheck.Expression != null) + { + targetCommand.AddParameter("SkipCNCheck", SkipCNCheck.Get(context)); + } + + if(SkipRevocationCheck.Expression != null) + { + targetCommand.AddParameter("SkipRevocationCheck", SkipRevocationCheck.Get(context)); + } + + if(SPNPort.Expression != null) + { + targetCommand.AddParameter("SPNPort", SPNPort.Get(context)); + } + + if(OperationTimeout.Expression != null) + { + targetCommand.AddParameter("OperationTimeout", OperationTimeout.Get(context)); + } + + if(NoEncryption.Expression != null) + { + targetCommand.AddParameter("NoEncryption", NoEncryption.Get(context)); + } + + if(UseUTF16.Expression != null) + { + targetCommand.AddParameter("UseUTF16", UseUTF16.Get(context)); + } + + + return new ActivityImplementationContext() { PowerShellInstance = invoker }; + } + } +} diff --git a/src/Microsoft.WSMan.Management.Activities/Generated/RemoveWSManInstanceActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/RemoveWSManInstanceActivity.cs new file mode 100644 index 0000000000..3b6159289d --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/RemoveWSManInstanceActivity.cs @@ -0,0 +1,212 @@ +// +// 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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Remove-WSManInstance command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class RemoveWSManInstance : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public RemoveWSManInstance() + { + this.DisplayName = "Remove-WSManInstance"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Remove-WSManInstance"; } } + + // Arguments + + /// + /// Provides access to the ApplicationName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ApplicationName { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the ConnectionURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ConnectionURI { get; set; } + + /// + /// Provides access to the OptionSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument OptionSet { get; set; } + + /// + /// Provides access to the Port parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Port { get; set; } + + /// + /// Provides access to the ResourceURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ResourceURI { get; set; } + + /// + /// Provides access to the SelectorSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SelectorSet { get; set; } + + /// + /// Provides access to the SessionOption parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SessionOption { get; set; } + + /// + /// Provides access to the UseSSL parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseSSL { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authentication { get; set; } + + /// + /// Provides access to the CertificateThumbprint parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument CertificateThumbprint { 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(ApplicationName.Expression != null) + { + targetCommand.AddParameter("ApplicationName", ApplicationName.Get(context)); + } + + if((ComputerName.Expression != null) && (PSRemotingBehavior.Get(context) != RemotingBehavior.Custom)) + { + targetCommand.AddParameter("ComputerName", ComputerName.Get(context)); + } + + if(ConnectionURI.Expression != null) + { + targetCommand.AddParameter("ConnectionURI", ConnectionURI.Get(context)); + } + + if(OptionSet.Expression != null) + { + targetCommand.AddParameter("OptionSet", OptionSet.Get(context)); + } + + if(Port.Expression != null) + { + targetCommand.AddParameter("Port", Port.Get(context)); + } + + if(ResourceURI.Expression != null) + { + targetCommand.AddParameter("ResourceURI", ResourceURI.Get(context)); + } + + if(SelectorSet.Expression != null) + { + targetCommand.AddParameter("SelectorSet", SelectorSet.Get(context)); + } + + if(SessionOption.Expression != null) + { + targetCommand.AddParameter("SessionOption", SessionOption.Get(context)); + } + + if(UseSSL.Expression != null) + { + targetCommand.AddParameter("UseSSL", UseSSL.Get(context)); + } + + if(Credential.Expression != null) + { + targetCommand.AddParameter("Credential", Credential.Get(context)); + } + + if(Authentication.Expression != null) + { + targetCommand.AddParameter("Authentication", Authentication.Get(context)); + } + + if(CertificateThumbprint.Expression != null) + { + targetCommand.AddParameter("CertificateThumbprint", CertificateThumbprint.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.WSMan.Management.Activities/Generated/SetWSManInstanceActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/SetWSManInstanceActivity.cs new file mode 100644 index 0000000000..7dfd122dcc --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/SetWSManInstanceActivity.cs @@ -0,0 +1,259 @@ +// +// 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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Set-WSManInstance command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class SetWSManInstance : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public SetWSManInstance() + { + this.DisplayName = "Set-WSManInstance"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Set-WSManInstance"; } } + + // Arguments + + /// + /// Provides access to the ApplicationName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ApplicationName { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the ConnectionURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ConnectionURI { get; set; } + + /// + /// Provides access to the Dialect parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Dialect { get; set; } + + /// + /// Provides access to the FilePath parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument FilePath { get; set; } + + /// + /// Provides access to the Fragment parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Fragment { get; set; } + + /// + /// Provides access to the OptionSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument OptionSet { get; set; } + + /// + /// Provides access to the Port parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Port { get; set; } + + /// + /// Provides access to the ResourceURI parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ResourceURI { get; set; } + + /// + /// Provides access to the SelectorSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SelectorSet { get; set; } + + /// + /// Provides access to the SessionOption parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SessionOption { get; set; } + + /// + /// Provides access to the UseSSL parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseSSL { get; set; } + + /// + /// Provides access to the ValueSet parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ValueSet { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authentication { get; set; } + + /// + /// Provides access to the CertificateThumbprint parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument CertificateThumbprint { 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(ApplicationName.Expression != null) + { + targetCommand.AddParameter("ApplicationName", ApplicationName.Get(context)); + } + + if((ComputerName.Expression != null) && (PSRemotingBehavior.Get(context) != RemotingBehavior.Custom)) + { + targetCommand.AddParameter("ComputerName", ComputerName.Get(context)); + } + + if(ConnectionURI.Expression != null) + { + targetCommand.AddParameter("ConnectionURI", ConnectionURI.Get(context)); + } + + if(Dialect.Expression != null) + { + targetCommand.AddParameter("Dialect", Dialect.Get(context)); + } + + if(FilePath.Expression != null) + { + targetCommand.AddParameter("FilePath", FilePath.Get(context)); + } + + if(Fragment.Expression != null) + { + targetCommand.AddParameter("Fragment", Fragment.Get(context)); + } + + if(OptionSet.Expression != null) + { + targetCommand.AddParameter("OptionSet", OptionSet.Get(context)); + } + + if(Port.Expression != null) + { + targetCommand.AddParameter("Port", Port.Get(context)); + } + + if(ResourceURI.Expression != null) + { + targetCommand.AddParameter("ResourceURI", ResourceURI.Get(context)); + } + + if(SelectorSet.Expression != null) + { + targetCommand.AddParameter("SelectorSet", SelectorSet.Get(context)); + } + + if(SessionOption.Expression != null) + { + targetCommand.AddParameter("SessionOption", SessionOption.Get(context)); + } + + if(UseSSL.Expression != null) + { + targetCommand.AddParameter("UseSSL", UseSSL.Get(context)); + } + + if(ValueSet.Expression != null) + { + targetCommand.AddParameter("ValueSet", ValueSet.Get(context)); + } + + if(Credential.Expression != null) + { + targetCommand.AddParameter("Credential", Credential.Get(context)); + } + + if(Authentication.Expression != null) + { + targetCommand.AddParameter("Authentication", Authentication.Get(context)); + } + + if(CertificateThumbprint.Expression != null) + { + targetCommand.AddParameter("CertificateThumbprint", CertificateThumbprint.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.WSMan.Management.Activities/Generated/SetWSManQuickConfigActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/SetWSManQuickConfigActivity.cs new file mode 100644 index 0000000000..c28990a61b --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/SetWSManQuickConfigActivity.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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Set-WSManQuickConfig command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class SetWSManQuickConfig : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public SetWSManQuickConfig() + { + this.DisplayName = "Set-WSManQuickConfig"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Set-WSManQuickConfig"; } } + + // Arguments + + /// + /// Provides access to the UseSSL parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseSSL { get; set; } + + /// + /// Provides access to the Force parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Force { get; set; } + + /// + /// Provides access to the SkipNetworkProfileCheck parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument SkipNetworkProfileCheck { 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(UseSSL.Expression != null) + { + targetCommand.AddParameter("UseSSL", UseSSL.Get(context)); + } + + if(Force.Expression != null) + { + targetCommand.AddParameter("Force", Force.Get(context)); + } + + if(SkipNetworkProfileCheck.Expression != null) + { + targetCommand.AddParameter("SkipNetworkProfileCheck", SkipNetworkProfileCheck.Get(context)); + } + + + return new ActivityImplementationContext() { PowerShellInstance = invoker }; + } + } +} diff --git a/src/Microsoft.WSMan.Management.Activities/Generated/TestWSManActivity.cs b/src/Microsoft.WSMan.Management.Activities/Generated/TestWSManActivity.cs new file mode 100644 index 0000000000..60c7bc25bd --- /dev/null +++ b/src/Microsoft.WSMan.Management.Activities/Generated/TestWSManActivity.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.WSMan.Management.Activities +{ + /// + /// Activity to invoke the Microsoft.WSMan.Management\Test-WSMan command in a Workflow. + /// + [System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")] + public sealed class TestWSMan : PSRemotingActivity + { + /// + /// Gets the display name of the command invoked by this activity. + /// + public TestWSMan() + { + this.DisplayName = "Test-WSMan"; + } + + /// + /// Gets the fully qualified name of the command invoked by this activity. + /// + public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Test-WSMan"; } } + + // Arguments + + /// + /// Provides access to the Authentication parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Authentication { get; set; } + + /// + /// Provides access to the ComputerName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ComputerName { get; set; } + + /// + /// Provides access to the Port parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Port { get; set; } + + /// + /// Provides access to the UseSSL parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument UseSSL { get; set; } + + /// + /// Provides access to the ApplicationName parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument ApplicationName { get; set; } + + /// + /// Provides access to the Credential parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument Credential { get; set; } + + /// + /// Provides access to the CertificateThumbprint parameter. + /// + [ParameterSpecificCategory] + [DefaultValue(null)] + public InArgument CertificateThumbprint { 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(Authentication.Expression != null) + { + targetCommand.AddParameter("Authentication", Authentication.Get(context)); + } + + if((ComputerName.Expression != null) && (PSRemotingBehavior.Get(context) != RemotingBehavior.Custom)) + { + targetCommand.AddParameter("ComputerName", ComputerName.Get(context)); + } + + if(Port.Expression != null) + { + targetCommand.AddParameter("Port", Port.Get(context)); + } + + if(UseSSL.Expression != null) + { + targetCommand.AddParameter("UseSSL", UseSSL.Get(context)); + } + + if(ApplicationName.Expression != null) + { + targetCommand.AddParameter("ApplicationName", ApplicationName.Get(context)); + } + + if(Credential.Expression != null) + { + targetCommand.AddParameter("Credential", Credential.Get(context)); + } + + if(CertificateThumbprint.Expression != null) + { + targetCommand.AddParameter("CertificateThumbprint", CertificateThumbprint.Get(context)); + } + + if(GetIsComputerNameSpecified(context) && (PSRemotingBehavior.Get(context) == RemotingBehavior.Custom)) + { + targetCommand.AddParameter("ComputerName", PSComputerName.Get(context)); + } + + + return new ActivityImplementationContext() { PowerShellInstance = invoker }; + } + } +}