powershell v3-RC: specific comment line causes all scripts to fail
Votes from Connect: 11
Original Date Submitted: 7/13/2012 3:45:58 AM
Description:
Contact Information
Handle: RichardMcKenzie
Site Name: PowerShell
Feedback ID: 753494
Frequency: Always Happens
Regression: No, this is new to the most recent version
Problem Description:
A new bug has been introduced in powershell v3.0 - RC that does not exist in v3.0 CTP2.
It appears that .ps1 scripts fail to execute and throw the runtime error "Executable script code found in signature block" if the following line appears in the script:
organizational unit filter
Product Studio item created by Connect Synchronizer due to creation of feedback ID 753494 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=753494).
Repro Steps:
enter the following line into any powershell v3.0-RC script and it will fail
organizational unit filter
ISE will highlight all subsequent code with red underline and show the mouse-hover message "Executable script code found in signature block" and attempts to execute the script will fail with the same runtime exception.
I have tried a few variations, and it appears that only that very specific string causes a failure ... adding any other non-whitespace character to that string removes the error.
What are the chances anyone else would come across that obscure bug ??? heh heh ... oh well ... keep up the good work - loving powershell
Richard McKenzie
richard@rmck.com
Notes:
- execution policy is set to bypass
- works from v3 CTP2 machine on same network & domain, running same OS
Richard McKenzie
Expected Results:
Internal BugId: 3709
