Skip to content

Conversation

@daxian-dbw
Copy link
Member

The file powershell.version has been removed as we now figure out PSVersion and GitCommitId from the ProductVersion of S,M.A.dll. Update the script to get the PSVersion directly from $PSVersionTable.PSVersion.

[ValidateNotNullOrEmpty()]
[parameter(Mandatory = $true, ParameterSetName = "ByPath")]
[string]
$PowerShellVersion = "6.0.0-alpha.8"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the path is provided, we should get the powershell version using powershell -vand get rid of this parameter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. Will make the change.

@iSazonov
Copy link
Collaborator

iSazonov commented Oct 7, 2017

I wonder why the script is in src/powershell-native directory?

Copy link
Member

@adityapatwardhan adityapatwardhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with minor comments.

[ValidateNotNullOrEmpty()]
[parameter(Mandatory = $true, ParameterSetName = "ByPath")]
[string]
$PowerShellVersion = "6.0.0-alpha.8"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

@daxian-dbw
Copy link
Member Author

@iSazonov This script is to register WinRM endpoint configuration to make pwrshplugin.dll work for powershell core remoting. It's bundled together with pwrshplugin.dll in psrp.windows nuget package.

@mirichmo
Copy link
Member

mirichmo commented Oct 9, 2017

A few clean up items since we are touching this file:

  1. Line 6 should be removed. It is no longer relevant.
  2. The comment on line 39 should be cleaned up to be "powershell.6.0.0-beta.3"
  3. Line 78 should be uncommented. The registry file doesn't get cleaned up during MSI uninstallation
  4. The comment on line 116 should be moved to line 3 to become the introductory description since it provides an overview of the script. Right now, it is buried in the middle and hard to find.

reg.exe import .\$fileName

# Clean up
# Remove-Item .\$fileName
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean up should still take place. Just remove the "#" on line 74

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added that line back.

@daxian-dbw
Copy link
Member Author

@SteveL-MSFT Your comment has been addressed. Can you please take another look?
@adityapatwardhan The failure of macOS is not related to this PR. #5065 will fix macOS build.

Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@adityapatwardhan adityapatwardhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adityapatwardhan
Copy link
Member

Restarted MacOS build.

@daxian-dbw
Copy link
Member Author

daxian-dbw commented Oct 9, 2017

@adityapatwardhan The build is still failing, but it's not related to this PR.

@adityapatwardhan adityapatwardhan merged commit 55ce5dc into PowerShell:master Oct 9, 2017
@daxian-dbw daxian-dbw deleted the fixremotescript branch October 9, 2017 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants