-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Disable cmdlets that are not supported under unix system #5083
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
Conversation
|
Usually we exclude not ported cmdlets with Also we need correct tests in DefaultCommands.Tests.ps1 |
|
@chunqingchen Sorry, my comment was not approved. I remember @daxian-dbw said that it is better exclude code in csproj - it is easy to track. @daxian-dbw Could you confirm? |
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.
Extra line added.
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.
Would ! Platform.IsWindows work?
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.
For consistency sake, can we use non-windows path here?
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.
For consistency sake, can we use non-windows path here?
bd31660 to
17c7418
Compare
|
@adityapatwardhan your comments are resolved. |
c8d72b3 to
063b5d1
Compare
|
The last commit is lot linked to a github account. Please resolve. |
d8d84b3 to
d70bbac
Compare
|
@chunqingchen The title and the description needs to be updated to match the implementation. |
4781090 to
88fd625
Compare
… tests to defaultcommands.tests.ps1
|
@adityapatwardhan updated |
| public void LoadCommandStop(string Name) { WriteEvent(26, Name); } | ||
| } | ||
| } | ||
| } |
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.
Please add new line at EOF.
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.
@chunqingchen Sorry, we should add newline after the last brace not before.
| Test-Path Function:more | Should Be $true | ||
| } | ||
| } | ||
| } |
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.
Please add new line at EOF.
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.
@chunqingchen Sorry, we should add newline after the last brace not before.
|
@iSazonov your comment is resolved |
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.
Leave a comment
| Test-Path Function:more | Should Be $true | ||
| } | ||
| } | ||
| } |
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.
@chunqingchen Sorry, we should add newline after the last brace not before.
| public void LoadCommandStop(string Name) { WriteEvent(26, Name); } | ||
| } | ||
| } | ||
| } |
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.
@chunqingchen Sorry, we should add newline after the last brace not before.
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.
missing newline
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.
missing newline
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.
Fix minor issue and it should be good
|
@TravisEz13 new line added. |
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.
Should we exclude the code from compilation?
| public void LoadCommandStart(string Name) { WriteEvent(25, Name); } | ||
| public void LoadCommandStop(string Name) { WriteEvent(26, Name); } | ||
| } | ||
|
|
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.
Please revert the formatting change and remove the line.
| It "Should have 'more' as a function" { | ||
| Test-Path Function:more | Should Be $true | ||
| } | ||
|
|
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.
Please revert the formatting change and remove the line.
|
@chunqingchen Please run all tests using |
|
@adityapatwardhan @iSazonov your comments are resolved. Thanks |
|
I believe the PR need #5379 to pass CI Appveyor. |
|
@chunqingchen Can you have a look at the Travis CI failure? |
|
CI Travis was passed but not reported. |
|
Merging as CI has passed but webhook did not update status to GitHub. |
|
@paulcallen Would you happen to know if |
|
@vinodc I'll dig into this. For now, you can use [System.Management.Automation.Remoting.PSSessionOption]::new() and populate the returned object. BTW: What's the use case you have for it on Linux. Perhaps it was missed with the cmdlet was removed. |
|
@dantraMSFT Thanks for the quick response. We are programmatically accessing Office 365 PowerShell cmdlets and in the process our code creates PSSessionOption objects. We can work around this temporarily, but wanted to make sure that the overall implementation itself is still supported for related commands used to connect to Office 365 PowerShell, starting with On a broader note, this is related to piped commands failing (#6206), where we were recommended to update PowerShell first to see if we could reproduce the failure on the latest version, which resulted in these new issues coming up. |
Have same issue when trying to use WINRM from linux without proper server certificate: |
|
@dreyTee Please open new issue for your question. |
resolve #4355
Removed cmdlets from IntialSessionState.cs so they will not be available on unix platforms.