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 — remove Get-PSHostProcessInfo under non-windows platform by chunqingchen · Pull Request #5105 · PowerShell/PowerShell

Conversation

@chunqingchen

@chunqingchen Chunqing Chen (chunqingchen) commented Oct 13, 2017

Copy link
Copy Markdown
Contributor

this is to resolve #5081

since api-ms-win-core-file-l1-1-0.dll is not supported under non-windows platform, remove the cmdlet

Sorry, something went wrong.

Uh oh!

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

All reactions
@chunqingchen
remove Get-PSHostProcessInfo under non-windows platform
7fecb62
@chunqingchen
Chunqing Chen (chunqingchen) requested review from Bruce Payette (BrucePay), Dongbo Wang (daxian-dbw), Jason Shirk (lzybkr) and sergei (vors) as code owners October 13, 2017 06:01
iSazonov
Ilya (iSazonov) reviewed Oct 13, 2017
View reviewed changes
Comment thread test/powershell/engine/Remoting/RemoteSession.Basic.Tests.ps1 Outdated
}

Describe "Verify remoting cmdlets that should not be implemented under non-windows platform" -Tags @("CI") {
It "Get-PSHostProcessInfo should be removed under non-windows platform" -Skip $IsWindows {

@iSazonov Ilya (iSazonov) Oct 13, 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.

We already have the test in DefaultCommands.Tests.ps1

Sorry, something went wrong.

Uh oh!

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

All reactions

@daxian-dbw Dongbo Wang (daxian-dbw) Oct 15, 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.

As Ilya (@iSazonov) pointed out, the test DefaultCommands.Tests.ps1 covers available cmdlets on different plats by default, can you please update that test?

Sorry, something went wrong.

Uh oh!

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

All reactions
daxian-dbw
Dongbo Wang (daxian-dbw) requested changes Oct 15, 2017
View reviewed changes
Comment thread src/System.Management.Automation/engine/InitialSessionState.cs
#if !UNIX
{"Disable-PSRemoting", new SessionStateCmdletEntry("Disable-PSRemoting", typeof(DisablePSRemotingCommand), helpFile) },
{"Enable-PSRemoting", new SessionStateCmdletEntry("Enable-PSRemoting", typeof(EnablePSRemotingCommand), helpFile) },
{"Get-PSHostProcessInfo", new SessionStateCmdletEntry("Get-PSHostProcessInfo", typeof(GetPSHostProcessInfoCommand), helpFile) },

@daxian-dbw Dongbo Wang (daxian-dbw) Oct 15, 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.

What about Enter-PSHostProcess and Exit-PSHostProcess? They are supposed to work with Get-PSHostProcessInfo. Maybe we should exclude them all? Paul Higinbotham (@PaulHigin) thoughts?

Sorry, something went wrong.

Uh oh!

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

All reactions

@PaulHigin Paul Higinbotham (PaulHigin) Oct 16, 2017

Copy link
Copy Markdown
Contributor

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.

Yes, these cmdlets should be exluded as well.

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
}

Describe "Verify remoting cmdlets that should not be implemented under non-windows platform" -Tags @("CI") {
It "Get-PSHostProcessInfo should be removed under non-windows platform" -Skip $IsWindows {

@daxian-dbw Dongbo Wang (daxian-dbw) Oct 15, 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.

As Ilya (@iSazonov) pointed out, the test DefaultCommands.Tests.ps1 covers available cmdlets on different plats by default, can you please update that test?

Sorry, something went wrong.

Uh oh!

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

All reactions
@daxian-dbw Dongbo Wang (daxian-dbw) self-assigned this Oct 15, 2017
@chunqingchen
Update tests and add additional cmdlets need to be excluded
a848561
iSazonov
Ilya (iSazonov) approved these changes Oct 18, 2017
View reviewed changes
daxian-dbw
Dongbo Wang (daxian-dbw) approved these changes Oct 18, 2017
View reviewed changes
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit dd5fba3 into PowerShell:master Oct 18, 2017
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@chunqingchen @daxian-dbw
Exclude PSHostProcess cmdlets from Unix platforms (PowerShell#5105)
38728bd
- Exclude 'Get-PSHostProcessInfo', 'Enter-PSHostProcess' and 'Exit-PSHostProcess' from Unix platforms.
- Update tests and add additional cmdlets need to be excluded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@daxian-dbw Dongbo Wang (daxian-dbw) daxian-dbw approved these changes
@iSazonov Ilya (iSazonov) iSazonov approved these changes
@BrucePay Bruce Payette (BrucePay) Awaiting requested review from BrucePay
@lzybkr Jason Shirk (lzybkr) Awaiting requested review from lzybkr
@vors sergei (vors) Awaiting requested review from vors
+1 more reviewer
@PaulHigin Paul Higinbotham (PaulHigin) PaulHigin left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@daxian-dbw Dongbo Wang (daxian-dbw)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Get-PSHostProcessInfo fails on non-Windows

Uh oh!

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

4 participants

@chunqingchen @daxian-dbw @PaulHigin @iSazonov
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 01402503 — 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.