Skip to content

Updating incorrect example of PowerShell.Create() - #7926

Merged
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
1RedOne:patch-1
Oct 3, 2018
Merged

Updating incorrect example of PowerShell.Create()#7926
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
1RedOne:patch-1

Conversation

@1RedOne

@1RedOne Stephen Owen (1RedOne) commented Oct 2, 2018

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:

PR Checklist

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.

@SteveL-MSFT Steve Lee (SteveL-MSFT) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find! Thanks!

@iSazonov
Ilya (iSazonov) merged commit 0789fb1 into PowerShell:master Oct 3, 2018
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants