Please feel free to provide feedback or file bugs here.

Love PowerShell but not a fan of one syntax requirement

Votes from Connect: 6

Original Date Submitted: 3/14/2015 4:56:44 AM

Description:
********Contact Information********
Handle: J. Michael Delaney
Site Name: PowerShell
Feedback ID: 1179419
***************************************

Problem Description:
Love PowerShell. It helps me so much in my daily tasks and I am constantly wowing co-workers with my skills.

When scripting, the only thing I don't like about PowerShell is that when doing conditional statements with if/elseif/else and looping constructs, that I need to use brace brackets when the conditional or loop executes one line of code.

For example, in other languages such as C++, I can do this:

If(x=10)
std::cout << "hello world!"
Else
std::cout << "goodbye!"

In PowerShell, I would need do this:

If($x -eq 10)
{
Write-host "hello world!"
}
Else
{
Write-host "goodbye!"
}

To me, seems unnecessary to have that since other languages that were the influence behind PowerShell have that functionality and yet PowerShell does not.

Product Studio item created by Connect Synchronizer due to creation of feedback ID 1179419 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=1179419).

Repro Steps:

Internal BugId: 14311

1 vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)

We’ll send you updates on this idea

AdminJoey Aiello [MSFT] (Program Manager, Windows Server) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base