Add source files for Microsoft.WSMan.Management.Activities

This commit is contained in:
PowerShell Team
2016-06-21 15:19:34 -07:00
committed by Dongbo Wang
parent 0234b9435d
commit 913be6bccf
14 changed files with 2193 additions and 0 deletions
@@ -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")]
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Connect-WSMan command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class ConnectWSMan : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public ConnectWSMan()
{
this.DisplayName = "Connect-WSMan";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Connect-WSMan"; } }
// Arguments
/// <summary>
/// Provides access to the ApplicationName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ApplicationName { get; set; }
/// <summary>
/// Provides access to the ComputerName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ComputerName { get; set; }
/// <summary>
/// Provides access to the ConnectionURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ConnectionURI { get; set; }
/// <summary>
/// Provides access to the OptionSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> OptionSet { get; set; }
/// <summary>
/// Provides access to the Port parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Port { get; set; }
/// <summary>
/// Provides access to the SessionOption parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.SessionOption> SessionOption { get; set; }
/// <summary>
/// Provides access to the UseSSL parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseSSL { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the Authentication parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.AuthenticationMechanism> Authentication { get; set; }
/// <summary>
/// Provides access to the CertificateThumbprint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CertificateThumbprint { get; set; }
/// <summary>
/// Declares that this activity supports its own remoting.
/// </summary>
protected override bool SupportsCustomRemoting { get { return true; } }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Disable-WSManCredSSP command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class DisableWSManCredSSP : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public DisableWSManCredSSP()
{
this.DisplayName = "Disable-WSManCredSSP";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Disable-WSManCredSSP"; } }
// Arguments
/// <summary>
/// Provides access to the Role parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Role { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(Role.Expression != null)
{
targetCommand.AddParameter("Role", Role.Get(context));
}
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Disconnect-WSMan command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class DisconnectWSMan : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public DisconnectWSMan()
{
this.DisplayName = "Disconnect-WSMan";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Disconnect-WSMan"; } }
// Arguments
/// <summary>
/// Provides access to the ComputerName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ComputerName { get; set; }
/// <summary>
/// Declares that this activity supports its own remoting.
/// </summary>
protected override bool SupportsCustomRemoting { get { return true; } }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if((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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Enable-WSManCredSSP command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class EnableWSManCredSSP : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public EnableWSManCredSSP()
{
this.DisplayName = "Enable-WSManCredSSP";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Enable-WSManCredSSP"; } }
// Arguments
/// <summary>
/// Provides access to the DelegateComputer parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String[]> DelegateComputer { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
/// <summary>
/// Provides access to the Role parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Role { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Get-WSManCredSSP command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetWSManCredSSP : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetWSManCredSSP()
{
this.DisplayName = "Get-WSManCredSSP";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Get-WSManCredSSP"; } }
// Arguments
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
return new ActivityImplementationContext() { PowerShellInstance = invoker };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Get-WSManInstance command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class GetWSManInstance : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public GetWSManInstance()
{
this.DisplayName = "Get-WSManInstance";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Get-WSManInstance"; } }
// Arguments
/// <summary>
/// Provides access to the ApplicationName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ApplicationName { get; set; }
/// <summary>
/// Provides access to the BasePropertiesOnly parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> BasePropertiesOnly { get; set; }
/// <summary>
/// Provides access to the ComputerName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ComputerName { get; set; }
/// <summary>
/// Provides access to the ConnectionURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ConnectionURI { get; set; }
/// <summary>
/// Provides access to the Dialect parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> Dialect { get; set; }
/// <summary>
/// Provides access to the Enumerate parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Enumerate { get; set; }
/// <summary>
/// Provides access to the Filter parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Filter { get; set; }
/// <summary>
/// Provides access to the Fragment parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Fragment { get; set; }
/// <summary>
/// Provides access to the OptionSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> OptionSet { get; set; }
/// <summary>
/// Provides access to the Port parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Port { get; set; }
/// <summary>
/// Provides access to the Associations parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Associations { get; set; }
/// <summary>
/// Provides access to the ResourceURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ResourceURI { get; set; }
/// <summary>
/// Provides access to the ReturnType parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ReturnType { get; set; }
/// <summary>
/// Provides access to the SelectorSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> SelectorSet { get; set; }
/// <summary>
/// Provides access to the SessionOption parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.SessionOption> SessionOption { get; set; }
/// <summary>
/// Provides access to the Shallow parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Shallow { get; set; }
/// <summary>
/// Provides access to the UseSSL parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseSSL { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the Authentication parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.AuthenticationMechanism> Authentication { get; set; }
/// <summary>
/// Provides access to the CertificateThumbprint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CertificateThumbprint { get; set; }
/// <summary>
/// Declares that this activity supports its own remoting.
/// </summary>
protected override bool SupportsCustomRemoting { get { return true; } }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Invoke-WSManAction command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class InvokeWSManAction : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public InvokeWSManAction()
{
this.DisplayName = "Invoke-WSManAction";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Invoke-WSManAction"; } }
// Arguments
/// <summary>
/// Provides access to the Action parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Action { get; set; }
/// <summary>
/// Provides access to the ApplicationName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ApplicationName { get; set; }
/// <summary>
/// Provides access to the ComputerName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ComputerName { get; set; }
/// <summary>
/// Provides access to the ConnectionURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ConnectionURI { get; set; }
/// <summary>
/// Provides access to the FilePath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> FilePath { get; set; }
/// <summary>
/// Provides access to the OptionSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> OptionSet { get; set; }
/// <summary>
/// Provides access to the Port parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Port { get; set; }
/// <summary>
/// Provides access to the SelectorSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> SelectorSet { get; set; }
/// <summary>
/// Provides access to the SessionOption parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.SessionOption> SessionOption { get; set; }
/// <summary>
/// Provides access to the UseSSL parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseSSL { get; set; }
/// <summary>
/// Provides access to the ValueSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> ValueSet { get; set; }
/// <summary>
/// Provides access to the ResourceURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ResourceURI { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the Authentication parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.AuthenticationMechanism> Authentication { get; set; }
/// <summary>
/// Provides access to the CertificateThumbprint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CertificateThumbprint { get; set; }
/// <summary>
/// Declares that this activity supports its own remoting.
/// </summary>
protected override bool SupportsCustomRemoting { get { return true; } }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\New-WSManInstance command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class NewWSManInstance : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public NewWSManInstance()
{
this.DisplayName = "New-WSManInstance";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\New-WSManInstance"; } }
// Arguments
/// <summary>
/// Provides access to the ApplicationName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ApplicationName { get; set; }
/// <summary>
/// Provides access to the ComputerName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ComputerName { get; set; }
/// <summary>
/// Provides access to the ConnectionURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ConnectionURI { get; set; }
/// <summary>
/// Provides access to the FilePath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> FilePath { get; set; }
/// <summary>
/// Provides access to the OptionSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> OptionSet { get; set; }
/// <summary>
/// Provides access to the Port parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Port { get; set; }
/// <summary>
/// Provides access to the ResourceURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ResourceURI { get; set; }
/// <summary>
/// Provides access to the SelectorSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> SelectorSet { get; set; }
/// <summary>
/// Provides access to the SessionOption parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.SessionOption> SessionOption { get; set; }
/// <summary>
/// Provides access to the UseSSL parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseSSL { get; set; }
/// <summary>
/// Provides access to the ValueSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> ValueSet { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the Authentication parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.AuthenticationMechanism> Authentication { get; set; }
/// <summary>
/// Provides access to the CertificateThumbprint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CertificateThumbprint { get; set; }
/// <summary>
/// Declares that this activity supports its own remoting.
/// </summary>
protected override bool SupportsCustomRemoting { get { return true; } }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\New-WSManSessionOption command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class NewWSManSessionOption : PSActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public NewWSManSessionOption()
{
this.DisplayName = "New-WSManSessionOption";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\New-WSManSessionOption"; } }
// Arguments
/// <summary>
/// Provides access to the ProxyAccessType parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.ProxyAccessType> ProxyAccessType { get; set; }
/// <summary>
/// Provides access to the ProxyAuthentication parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.ProxyAuthentication> ProxyAuthentication { get; set; }
/// <summary>
/// Provides access to the ProxyCredential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> ProxyCredential { get; set; }
/// <summary>
/// Provides access to the SkipCACheck parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> SkipCACheck { get; set; }
/// <summary>
/// Provides access to the SkipCNCheck parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> SkipCNCheck { get; set; }
/// <summary>
/// Provides access to the SkipRevocationCheck parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> SkipRevocationCheck { get; set; }
/// <summary>
/// Provides access to the SPNPort parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> SPNPort { get; set; }
/// <summary>
/// Provides access to the OperationTimeout parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> OperationTimeout { get; set; }
/// <summary>
/// Provides access to the NoEncryption parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> NoEncryption { get; set; }
/// <summary>
/// Provides access to the UseUTF16 parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseUTF16 { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Remove-WSManInstance command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class RemoveWSManInstance : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public RemoveWSManInstance()
{
this.DisplayName = "Remove-WSManInstance";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Remove-WSManInstance"; } }
// Arguments
/// <summary>
/// Provides access to the ApplicationName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ApplicationName { get; set; }
/// <summary>
/// Provides access to the ComputerName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ComputerName { get; set; }
/// <summary>
/// Provides access to the ConnectionURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ConnectionURI { get; set; }
/// <summary>
/// Provides access to the OptionSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> OptionSet { get; set; }
/// <summary>
/// Provides access to the Port parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Port { get; set; }
/// <summary>
/// Provides access to the ResourceURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ResourceURI { get; set; }
/// <summary>
/// Provides access to the SelectorSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> SelectorSet { get; set; }
/// <summary>
/// Provides access to the SessionOption parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.SessionOption> SessionOption { get; set; }
/// <summary>
/// Provides access to the UseSSL parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseSSL { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the Authentication parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.AuthenticationMechanism> Authentication { get; set; }
/// <summary>
/// Provides access to the CertificateThumbprint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CertificateThumbprint { get; set; }
/// <summary>
/// Declares that this activity supports its own remoting.
/// </summary>
protected override bool SupportsCustomRemoting { get { return true; } }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Set-WSManInstance command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class SetWSManInstance : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public SetWSManInstance()
{
this.DisplayName = "Set-WSManInstance";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Set-WSManInstance"; } }
// Arguments
/// <summary>
/// Provides access to the ApplicationName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ApplicationName { get; set; }
/// <summary>
/// Provides access to the ComputerName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ComputerName { get; set; }
/// <summary>
/// Provides access to the ConnectionURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ConnectionURI { get; set; }
/// <summary>
/// Provides access to the Dialect parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> Dialect { get; set; }
/// <summary>
/// Provides access to the FilePath parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> FilePath { get; set; }
/// <summary>
/// Provides access to the Fragment parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> Fragment { get; set; }
/// <summary>
/// Provides access to the OptionSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> OptionSet { get; set; }
/// <summary>
/// Provides access to the Port parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Port { get; set; }
/// <summary>
/// Provides access to the ResourceURI parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Uri> ResourceURI { get; set; }
/// <summary>
/// Provides access to the SelectorSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> SelectorSet { get; set; }
/// <summary>
/// Provides access to the SessionOption parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.SessionOption> SessionOption { get; set; }
/// <summary>
/// Provides access to the UseSSL parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseSSL { get; set; }
/// <summary>
/// Provides access to the ValueSet parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Collections.Hashtable> ValueSet { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the Authentication parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.AuthenticationMechanism> Authentication { get; set; }
/// <summary>
/// Provides access to the CertificateThumbprint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CertificateThumbprint { get; set; }
/// <summary>
/// Declares that this activity supports its own remoting.
/// </summary>
protected override bool SupportsCustomRemoting { get { return true; } }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Set-WSManQuickConfig command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class SetWSManQuickConfig : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public SetWSManQuickConfig()
{
this.DisplayName = "Set-WSManQuickConfig";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Set-WSManQuickConfig"; } }
// Arguments
/// <summary>
/// Provides access to the UseSSL parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseSSL { get; set; }
/// <summary>
/// Provides access to the Force parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> Force { get; set; }
/// <summary>
/// Provides access to the SkipNetworkProfileCheck parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> SkipNetworkProfileCheck { get; set; }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}
@@ -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
{
/// <summary>
/// Activity to invoke the Microsoft.WSMan.Management\Test-WSMan command in a Workflow.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("Microsoft.PowerShell.Activities.ActivityGenerator.GenerateFromName", "3.0")]
public sealed class TestWSMan : PSRemotingActivity
{
/// <summary>
/// Gets the display name of the command invoked by this activity.
/// </summary>
public TestWSMan()
{
this.DisplayName = "Test-WSMan";
}
/// <summary>
/// Gets the fully qualified name of the command invoked by this activity.
/// </summary>
public override string PSCommandName { get { return "Microsoft.WSMan.Management\\Test-WSMan"; } }
// Arguments
/// <summary>
/// Provides access to the Authentication parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<Microsoft.WSMan.Management.AuthenticationMechanism> Authentication { get; set; }
/// <summary>
/// Provides access to the ComputerName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ComputerName { get; set; }
/// <summary>
/// Provides access to the Port parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Int32> Port { get; set; }
/// <summary>
/// Provides access to the UseSSL parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.SwitchParameter> UseSSL { get; set; }
/// <summary>
/// Provides access to the ApplicationName parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> ApplicationName { get; set; }
/// <summary>
/// Provides access to the Credential parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.Management.Automation.PSCredential> Credential { get; set; }
/// <summary>
/// Provides access to the CertificateThumbprint parameter.
/// </summary>
[ParameterSpecificCategory]
[DefaultValue(null)]
public InArgument<System.String> CertificateThumbprint { get; set; }
/// <summary>
/// Declares that this activity supports its own remoting.
/// </summary>
protected override bool SupportsCustomRemoting { get { return true; } }
// Module defining this command
// Optional custom code for this activity
/// <summary>
/// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
/// </summary>
/// <param name="context">The NativeActivityContext for the currently running activity.</param>
/// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns>
/// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
{
System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create();
System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);
// Initialize the arguments
if(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 };
}
}
}