PowerShell-Docs icon indicating copy to clipboard operation
PowerShell-Docs copied to clipboard

Script Throws Error

Open aspnerd opened this issue 5 years ago • 4 comments

The example script as shown does not execute. The error received is below:

`At line:15 char:1
+ workflow Test-Workflow
+ ~~~~~~~~~~~~~~~~~~~~~~
The function or workflow 'Test-Workflow' cannot be redefined.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : FunctionRedefinitionNotAllowed`

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

aspnerd avatar Sep 09 '21 22:09 aspnerd

@aspnerd I am not able to reproduce the error you received. The error must be specific to your environment.

Also note that the example contains two different workflows. They happen to be use the same name. So if you are copying and pasting the code the Test-Workflow function is being defined and then redefined. The example is show two different ways to do parallel execution.

sdwheeler avatar Sep 10 '21 13:09 sdwheeler

If they are two different examples, you should have them displayed as such. Not as one.


Jeff Taylor @.@.> https://blog.reviewmydb.com

From: Sean Wheeler @.> Sent: Friday, September 10, 2021 9:59 AM To: MicrosoftDocs/PowerShell-Docs @.> Cc: Jeff Taylor @.>; Mention @.> Subject: Re: [MicrosoftDocs/PowerShell-Docs] Script Throws Error (#8068)

@aspnerdhttps://github.com/aspnerd I am not able to reproduce the error you received. The error must be specific to your environment.

Also note that the example contains two different workflows. They happen to be use the same name. So if you are copying and pasting the code the Test-Workflow function is being defined and then redefined. The example is show two different ways to do parallel execution.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/PowerShell-Docs/issues/8068#issuecomment-916925755, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEF7FQ3PFPBGXHAAK4PTBYDUBIFKBANCNFSM5DYDXOCQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

aspnerd avatar Sep 10 '21 14:09 aspnerd

Hey @aspnerd, Sean has already split the example after your original comment. You should see the update later today.

Thanks for your feedback here and have a good one!

chasewilson avatar Sep 10 '21 15:09 chasewilson

Great! Thanks!


Jeff Taylor @.@.> https://blog.reviewmydb.com

From: Chase Wilson @.> Sent: Friday, September 10, 2021 11:50 AM To: MicrosoftDocs/PowerShell-Docs @.> Cc: Jeff Taylor @.>; Mention @.> Subject: Re: [MicrosoftDocs/PowerShell-Docs] Script Throws Error (#8068)

Hey @aspnerdhttps://github.com/aspnerd, Sean has already split the example after your original comment. You should see the update later today.

Thanks for your feedback here and have a good one!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/PowerShell-Docs/issues/8068#issuecomment-917010889, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEF7FQ6WMZ2D2HC5DQZZ2I3UBISLFANCNFSM5DYDXOCQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

aspnerd avatar Sep 10 '21 15:09 aspnerd