Disable cmdlets that are not supported under unix system#5083
Disable cmdlets that are not supported under unix system#5083adityapatwardhan merged 3 commits intoPowerShell:masterfrom
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.
Would ! Platform.IsWindows work?
There was a problem hiding this comment.
For consistency sake, can we use non-windows path here?
There was a problem hiding this comment.
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); } | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Please add new line at EOF.
There was a problem hiding this comment.
@chunqingchen Sorry, we should add newline after the last brace not before.
| Test-Path Function:more | Should Be $true | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
Please add new line at EOF.
There was a problem hiding this comment.
@chunqingchen Sorry, we should add newline after the last brace not before.
|
@iSazonov your comment is resolved |
| Test-Path Function:more | Should Be $true | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
@chunqingchen Sorry, we should add newline after the last brace not before.
| public void LoadCommandStop(string Name) { WriteEvent(26, Name); } | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
@chunqingchen Sorry, we should add newline after the last brace not before.
TravisEz13
left a comment
There was a problem hiding this comment.
Fix minor issue and it should be good
|
@TravisEz13 new line added. |
| public void LoadCommandStart(string Name) { WriteEvent(25, Name); } | ||
| public void LoadCommandStop(string Name) { WriteEvent(26, Name); } | ||
| } | ||
|
|
There was a problem hiding this comment.
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.
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.