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 — Updating incorrect example of PowerShell.Create() by 1RedOne · Pull Request #7926 · PowerShell/PowerShell

Conversation

@1RedOne

@1RedOne Stephen Owen (1RedOne) commented Oct 2, 2018 •
edited by iSazonov
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Updating this documentation, per this issue in Github. MicrosoftDocs/PowerShell-Docs#2938

The overload for powerShell.Create() are either RunSpaceMode, or InitialSessionState. In order to accept a command, one must use the .AddScript method.

PR Summary

Took some digging to find this, but it looks like Docs.Microsoft.Com scrapes files like these to generate the code samples.

The intention is that this change:

  • Should happen, as it appears to be incorrect as is today in the comments
  • Hopefully will drive an update to this page as well - https://docs.microsoft.com/en-us/dotnet/api/system.management.automation.powershell?view=pscore-6.0.0

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • User-facing Documentation needed
      • Issue filed - Issue link:
  • Testing - New and feature
    • Not Applicable or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
      • Add [feature] if the change is significant or affects feature tests

Sorry, something went wrong.

Uh oh!

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

All reactions
@1RedOne
Updating incorrect example of PowerShell.Create()
b2ea655
Updating this documentation, per this issue in Github.  MicrosoftDocs/PowerShell-Docs#2938 

The overload for powerShell.Create() are either RunSpaceMode, or InitialSessionState.  In order to accept a command, one must use the .AddScript method.
@1RedOne
Stephen Owen (1RedOne) requested review from Bruce Payette (BrucePay) and Dongbo Wang (daxian-dbw) as code owners October 2, 2018 19:04
@iSazonov
Ilya (iSazonov) requested a review from Steve Lee (SteveL-MSFT) October 3, 2018 11:56
@iSazonov Ilya (iSazonov) self-assigned this Oct 3, 2018
SteveL-MSFT
Steve Lee (SteveL-MSFT) approved these changes Oct 3, 2018
View reviewed changes

@SteveL-MSFT Steve Lee (SteveL-MSFT) 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.

Great find! Thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
@iSazonov
Ilya (iSazonov) merged commit 0789fb1 into PowerShell:master Oct 3, 2018
Aditya Patwardhan (adityapatwardhan) pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 9, 2019
@1RedOne @iSazonov
Updating incorrect example of PowerShell.Create() (PowerShell#7926)
9609771
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@1RedOne @iSazonov
Updating incorrect example of PowerShell.Create() (PowerShell#7926)
1a1b3ff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@SteveL-MSFT Steve Lee (SteveL-MSFT) SteveL-MSFT approved these changes
@BrucePay Bruce Payette (BrucePay) Awaiting requested review from BrucePay
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw

Uh oh!

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

Assignees

@iSazonov Ilya (iSazonov)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

@1RedOne @SteveL-MSFT @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.