GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Disable cmdlets that are not supported under unix system by chunqingchen · Pull Request #5083 · PowerShell/PowerShell

Conversation

@chunqingchen

@chunqingchen Chunqing Chen (chunqingchen) commented Oct 11, 2017 •
edited by adityapatwardhan
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

resolve #4355

Removed cmdlets from IntialSessionState.cs so they will not be available on unix platforms.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chunqingchen
Chunqing Chen (chunqingchen) requested review from Paul Higinbotham (PaulHigin), Dan Travison (dantraMSFT) and Mike Richmond (mirichmo) as code owners October 11, 2017 08:44
@iSazonov

Ilya (iSazonov) commented Oct 11, 2017

Copy link
Copy Markdown
Collaborator

Usually we exclude not ported cmdlets with #if !UNIX (or exclude whole file in csproj) and remove from psd1

Also we need correct tests in DefaultCommands.Tests.ps1

SteveL-MSFT reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov Ilya (iSazonov) assigned Aditya Patwardhan (adityapatwardhan) Oct 15, 2017
@chunqingchen

Chunqing Chen (chunqingchen) commented Oct 18, 2017

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) in issue #4355 you mentioned not implantation exception should be added instead of excluding the cmdlets. Is that not the case now?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Oct 18, 2017

Copy link
Copy Markdown
Collaborator

Chunqing Chen (@chunqingchen) Sorry, my comment was not approved. I remember Dongbo Wang (@daxian-dbw) said that it is better exclude code in csproj - it is easy to track. Dongbo Wang (@daxian-dbw) Could you confirm?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

adityapatwardhan
Aditya Patwardhan (adityapatwardhan) requested changes Oct 23, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/remoting/commands/ConnectPSSession.cs Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 17, 2017

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/System.Management.Automation/engine/remoting/commands/CustomShellCommands.cs Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 17, 2017

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/engine/Remoting/RemoteSession.Basic.Tests.ps1 Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 23, 2017

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/engine/Remoting/RemoteSession.Basic.Tests.ps1 Outdated

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Oct 23, 2017

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the bugfix1 branch from 50b001f to 14c93c6 Compare October 27, 2017 10:29
@chunqingchen
Chunqing Chen (chunqingchen) requested review from Bruce Payette (BrucePay), Travis Plunk (TravisEz13), Dongbo Wang (daxian-dbw) and Jason Shirk (lzybkr) as code owners October 27, 2017 10:29
@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the bugfix1 branch 2 times, most recently from bd31660 to 17c7418 Compare October 27, 2017 10:40
@chunqingchen

Chunqing Chen (chunqingchen) commented Oct 27, 2017

Copy link
Copy Markdown
Contributor Author

Aditya Patwardhan (@adityapatwardhan) your comments are resolved.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the bugfix1 branch 2 times, most recently from c8d72b3 to 063b5d1 Compare October 28, 2017 02:16
@TravisEz13

Travis Plunk (TravisEz13) commented Oct 28, 2017

Copy link
Copy Markdown
Member

The last commit is lot linked to a github account. Please resolve.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the bugfix1 branch 3 times, most recently from d8d84b3 to d70bbac Compare October 31, 2017 22:28
@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Oct 31, 2017

Copy link
Copy Markdown
Member

Chunqing Chen (@chunqingchen) The title and the description needs to be updated to match the implementation.

TravisEz13 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the bugfix1 branch 4 times, most recently from 4781090 to 88fd625 Compare November 1, 2017 05:58
@chunqingchen
perminently remove cmdlets that are not supported under Unix and move…
7fcf03b
… tests to defaultcommands.tests.ps1
@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the bugfix1 branch from 88fd625 to 7fcf03b Compare November 1, 2017 07:16
@chunqingchen Chunqing Chen (chunqingchen) changed the title add notimplementedException to cmdlets that are temporary not support… Disable cmdlets that are not supported under unix system Nov 1, 2017
@chunqingchen

Chunqing Chen (chunqingchen) commented Nov 1, 2017

Copy link
Copy Markdown
Contributor Author

Aditya Patwardhan (@adityapatwardhan) updated

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov
Ilya (iSazonov) reviewed Nov 1, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/InitialSessionState.cs Outdated
public void LoadCommandStop(string Name) { WriteEvent(26, Name); }
}
}
} No newline at end of file

@iSazonov Ilya (iSazonov) Nov 1, 2017

Copy link
Copy Markdown
Collaborator

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iSazonov Ilya (iSazonov) Nov 2, 2017

Copy link
Copy Markdown
Collaborator

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.

Chunqing Chen (@chunqingchen) Sorry, we should add newline after the last brace not before.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/engine/Basic/DefaultCommands.Tests.ps1 Outdated
Test-Path Function:more | Should Be $true
}
}
} No newline at end of file

@iSazonov Ilya (iSazonov) Nov 1, 2017

Copy link
Copy Markdown
Collaborator

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iSazonov Ilya (iSazonov) Nov 2, 2017

Copy link
Copy Markdown
Collaborator

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.

Chunqing Chen (@chunqingchen) Sorry, we should add newline after the last brace not before.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chunqingchen

Chunqing Chen (chunqingchen) commented Nov 1, 2017

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) your comment is resolved

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov
Ilya (iSazonov) reviewed Nov 2, 2017
View reviewed changes

@iSazonov Ilya (iSazonov) left a comment

Copy link
Copy Markdown
Collaborator

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/engine/Basic/DefaultCommands.Tests.ps1 Outdated
Test-Path Function:more | Should Be $true
}
}
} No newline at end of file

@iSazonov Ilya (iSazonov) Nov 2, 2017

Copy link
Copy Markdown
Collaborator

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.

Chunqing Chen (@chunqingchen) Sorry, we should add newline after the last brace not before.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/System.Management.Automation/engine/InitialSessionState.cs Outdated
public void LoadCommandStop(string Name) { WriteEvent(26, Name); }
}
}
} No newline at end of file

@iSazonov Ilya (iSazonov) Nov 2, 2017

Copy link
Copy Markdown
Collaborator

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.

Chunqing Chen (@chunqingchen) Sorry, we should add newline after the last brace not before.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
TravisEz13
Travis Plunk (TravisEz13) reviewed Nov 2, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/InitialSessionState.cs Outdated

@TravisEz13 Travis Plunk (TravisEz13) Nov 2, 2017

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
TravisEz13
Travis Plunk (TravisEz13) reviewed Nov 2, 2017
View reviewed changes
Comment thread test/powershell/engine/Basic/DefaultCommands.Tests.ps1 Outdated

@TravisEz13 Travis Plunk (TravisEz13) Nov 2, 2017

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
TravisEz13
Travis Plunk (TravisEz13) approved these changes Nov 2, 2017
View reviewed changes

@TravisEz13 Travis Plunk (TravisEz13) left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@chunqingchen
adding new line EOF
c1e1184
@chunqingchen
Chunqing Chen (chunqingchen) force-pushed the bugfix1 branch from f4eb37a to c1e1184 Compare November 2, 2017 23:58
@chunqingchen

Chunqing Chen (chunqingchen) commented Nov 2, 2017

Copy link
Copy Markdown
Contributor Author

Travis Plunk (@TravisEz13) new line added.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov
Ilya (iSazonov) reviewed Nov 3, 2017
View reviewed changes

@iSazonov Ilya (iSazonov) left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/System.Management.Automation/engine/InitialSessionState.cs Outdated
public void LoadCommandStart(string Name) { WriteEvent(25, Name); }
public void LoadCommandStop(string Name) { WriteEvent(26, Name); }
}

@iSazonov Ilya (iSazonov) Nov 3, 2017

Copy link
Copy Markdown
Collaborator

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/powershell/engine/Basic/DefaultCommands.Tests.ps1 Outdated
It "Should have 'more' as a function" {
Test-Path Function:more | Should Be $true
}

@iSazonov Ilya (iSazonov) Nov 3, 2017

Copy link
Copy Markdown
Collaborator

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Nov 6, 2017

Copy link
Copy Markdown
Member

Chunqing Chen (@chunqingchen) Please run all tests using [Feature] in your git commit message.

https://github.com/PowerShell/PowerShell/blob/a1b7f8be3ea4ac7e4f7a67e6261ad68cdb23143d/docs/testing-guidelines/testing-guidelines.md#requesting-additional-tests-for-a-pr

TravisEz13 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chunqingchen
[Feature] adding new line EOF
ea3d8f6
@chunqingchen

Chunqing Chen (chunqingchen) commented Nov 8, 2017

Copy link
Copy Markdown
Contributor Author

Aditya Patwardhan (@adityapatwardhan) Ilya (@iSazonov) your comments are resolved. Thanks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Nov 8, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

I believe the PR need #5379 to pass CI Appveyor.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Nov 10, 2017

Copy link
Copy Markdown
Member

Chunqing Chen (@chunqingchen) Can you have a look at the Travis CI failure?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

adityapatwardhan
Aditya Patwardhan (adityapatwardhan) approved these changes Nov 10, 2017
View reviewed changes
@iSazonov

Ilya (iSazonov) commented Nov 10, 2017

Copy link
Copy Markdown
Collaborator

CI Travis was passed but not reported.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Nov 10, 2017

Copy link
Copy Markdown
Member

Merging as CI has passed but webhook did not update status to GitHub.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 2be13a6 into PowerShell:master Nov 10, 2017
@vinodc

Vinod Chandru (vinodc) commented Feb 21, 2018

Copy link
Copy Markdown

Paul Allen (@paulcallen) Would you happen to know if New-PSSessionOption has been disabled? We updated to the latest version from 6.0.0 beta1 and this no longer works. It was previously working great and we have been using it with New-PSSessionOption since PowerShell/psl-omi-provider#67 was merged in.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dantraMSFT

Dan Travison (dantraMSFT) commented Feb 22, 2018

Copy link
Copy Markdown
Contributor

Vinod Chandru (@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vinodc

Vinod Chandru (vinodc) commented Feb 22, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Dan Travison (@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 New-PSSessionOption.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vinodc Vinod Chandru (vinodc) mentioned this pull request Feb 22, 2018
pipe for office 365 not working on linux: Get-Mailbox | Get-MailboxPermission #6206
Closed
@dreyTee

Drey Tee (dreyTee) commented May 5, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Paul Allen (@paulcallen) Would you happen to know if New-PSSessionOption has been disabled?

Have same issue when trying to use WINRM from linux without proper server certificate:
Getting error:
Use the PSSessionOption -SkipCACheck and -SkipCNCheck
Trying to use thes options with New-PSSessionOption but can't:
New-PSSessionOption : The term 'New-PSSessionOption' is not recognized as the name of a cmdlet, function, script file, or operable program.
Please advise a workaround a least.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented May 5, 2019

Copy link
Copy Markdown
Collaborator

Drey Tee (@dreyTee) Please open new issue for your question.

TravisEz13 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@chunqingchen @adityapatwardhan
Disable cmdlets that are not supported under unix system (PowerShell#…
a404530
…5083)

* permanently remove cmdlets that are not supported under Unix and move tests to defaultcommands.tests.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iSazonov Ilya (iSazonov) iSazonov left review comments
@TravisEz13 Travis Plunk (TravisEz13) TravisEz13 approved these changes
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) adityapatwardhan approved these changes
@dantraMSFT Dan Travison (dantraMSFT) Awaiting requested review from dantraMSFT
@mirichmo Mike Richmond (mirichmo) Awaiting requested review from mirichmo
@PaulHigin Paul Higinbotham (PaulHigin) Awaiting requested review from PaulHigin
@BrucePay Bruce Payette (BrucePay) Awaiting requested review from BrucePay
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw
@lzybkr Jason Shirk (lzybkr) Awaiting requested review from lzybkr

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@adityapatwardhan Aditya Patwardhan (adityapatwardhan)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Determine *-PSSession and *-PSSessionConfiguration Cmdlet Support Via OMI

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@chunqingchen @iSazonov @TravisEz13 @adityapatwardhan @vinodc @dantraMSFT @dreyTee
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.