-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Remove Workflow from PSSessionType #9618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,24 +75,6 @@ public enum AuthenticationMechanism | |
| Kerberos = 0x6, | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Specifies the type of session configuration that | ||
| /// should be used for creating a connection info. | ||
| /// </summary> | ||
| public enum PSSessionType | ||
| { | ||
| /// <summary> | ||
| /// Default PowerShell remoting | ||
| /// endpoint. | ||
| /// </summary> | ||
| DefaultRemoteShell = 0, | ||
|
|
||
| /// <summary> | ||
| /// Default Workflow endpoint. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel we should remove this. Is there any reason to keep it?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Register-PSSessionConfiguration cmdlet has PSSessionType parameter and I want get confirmation that we can make the breaking change:
I'd remove the PSSessionType type because we removed Workflow support and parser error will be ok. Thoughts? /cc @lzybkr |
||
| /// </summary> | ||
| Workflow = 1, | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Specify the type of access mode that should be | ||
| /// used when creating a session configuration. | ||
|
|
@@ -1503,44 +1485,6 @@ internal void SetDisconnectedExpiresOnToNow() | |
| } | ||
|
|
||
| #endregion Internal members | ||
|
|
||
| #region V3 Extensions | ||
|
|
||
| private const string DefaultM3PShellName = "Microsoft.PowerShell.Workflow"; | ||
| private const string DefaultM3PEndpoint = Remoting.Client.WSManNativeApi.ResourceURIPrefix + DefaultM3PShellName; | ||
|
|
||
| /// <summary> | ||
| /// Constructor that constructs the configuration name from its type. | ||
| /// </summary> | ||
| /// <param name="configurationType">Type of configuration to construct.</param> | ||
| public WSManConnectionInfo(PSSessionType configurationType) : this() | ||
| { | ||
| ComputerName = string.Empty; | ||
| switch (configurationType) | ||
| { | ||
| case PSSessionType.DefaultRemoteShell: | ||
| { | ||
| // it is already the default | ||
| } | ||
|
|
||
| break; | ||
|
|
||
| case PSSessionType.Workflow: | ||
| { | ||
| ShellUri = DefaultM3PEndpoint; | ||
| } | ||
|
|
||
| break; | ||
| default: | ||
| { | ||
| Diagnostics.Assert(false, "Unknown value for PSSessionType"); | ||
| } | ||
|
|
||
| break; | ||
| } | ||
| } | ||
|
|
||
| #endregion V3 Extensions | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,9 +52,7 @@ internal class ConfigurationDataFromXML | |
| internal const string MAXPSVERSIONTOKEN = "MaxPSVersion"; | ||
| internal const string MODULESTOIMPORT = "ModulesToImport"; | ||
| internal const string HOSTMODE = "hostmode"; | ||
| internal const string ENDPOINTCONFIGURATIONTYPE = "sessiontype"; | ||
| internal const string WORKFLOWCOREASSEMBLY = "Microsoft.PowerShell.Workflow.ServiceCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can remove this (WORKFLOWCOREASSEMBLY) and all code accessing it.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will do in follow PRs.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @iSazonov Thanks for doing this! It is great to get this cleaned up. |
||
| internal const string WORKFLOWCORETYPENAME = "Microsoft.PowerShell.Workflow.PSWorkflowSessionConfiguration"; | ||
| internal const string PSWORKFLOWMODULE = "%windir%\\system32\\windowspowershell\\v1.0\\Modules\\PSWorkflow"; | ||
| internal const string CONFIGFILEPATH = "configfilepath"; | ||
| internal const string CONFIGFILEPATH_CamelCase = "ConfigFilePath"; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also remove this method:
private bool IsWorkflowConfigurationType(System.Management.Automation.PowerShell ps)
on line: 3898
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd want to keep the PR as small as possible for fast review and for avoiding breaking something.
We will remove the method in follow PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the point in doing a partial removal. Workflows are no longer supported and so we might as well remove everything associated with it. Register-PSSessionConfiguration affects the local machine and configures endpoints for PSCore6, which no longer supports workflows. I don't see how removing everything workflow breaks functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PSSessionType and IsWorkflowConfigurationType() removed.