-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Update script to get PSVersion from $PSVersionTable #5045
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
Update script to get PSVersion from $PSVersionTable #5045
Conversation
| [ValidateNotNullOrEmpty()] | ||
| [parameter(Mandatory = $true, ParameterSetName = "ByPath")] | ||
| [string] | ||
| $PowerShellVersion = "6.0.0-alpha.8" |
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.
If the path is provided, we should get the powershell version using powershell -vand get rid of this parameter
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 agree.
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.
Sounds good. Will make the change.
|
I wonder why the script is in |
adityapatwardhan
left a comment
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.
Approved with minor comments.
| [ValidateNotNullOrEmpty()] | ||
| [parameter(Mandatory = $true, ParameterSetName = "ByPath")] | ||
| [string] | ||
| $PowerShellVersion = "6.0.0-alpha.8" |
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 agree.
|
@iSazonov This script is to register WinRM endpoint configuration to make |
|
A few clean up items since we are touching this file:
|
| reg.exe import .\$fileName | ||
|
|
||
| # Clean up | ||
| # Remove-Item .\$fileName |
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.
Clean up should still take place. Just remove the "#" on line 74
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.
Added that line back.
|
@SteveL-MSFT Your comment has been addressed. Can you please take another look? |
SteveL-MSFT
left a comment
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.
LGTM
adityapatwardhan
left a comment
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.
LGTM
|
Restarted MacOS build. |
|
@adityapatwardhan The build is still failing, but it's not related to this PR. |
The file
powershell.versionhas been removed as we now figure outPSVersionandGitCommitIdfrom theProductVersionofS,M.A.dll. Update the script to get the PSVersion directly from$PSVersionTable.PSVersion.