Poll: Interactive versus Script

I’m just curious: how do you use PowerShell most often?

A) I sit in the shell and execute cmdlets and tasks interactively


B) I have an editor open all the time and write scripts

Of course, we all do both things, but I’m asking for a relative comparison. I personally am in the shell 90%+ of the time. I had a conversation with some PowerShell MVPs recently, and I get the distinct impression that most of them are writing scripts most of the time. I’m curious to hear what everyone else says.

50/50 for me. In the shell to work out logic ad hoc, then in scripts to build commands, then back in the shell to test and work out more ad hoc work, rinse, repeat.

Mostly scripting, I’d say, but that’s to be expected at my job. We have around 5000 servers (and a bazillion POS devices) in the retail space, and most of the work gets done by pushing out scripts rather than interactively connecting to them, except when troubleshooting.

At the moment probably 80:20 scripting to shell. More shell when I’m testing.

I don’t view PowerShell as an either/or activity and in my opinion it is a huge mistake to do so. PowerShell gives us the opportunity and capability to work almost seamlessly from ad hoc interactive work to modules of advanced functions or CDXML that require a moer developer orientated approach. Because we can work where we need to on that spectrum wee get the power to solve our automation problems.

Pigeon holing PowerShell and your activities is a sure way to stunt the growth of capability

Richard, you crack me up. You are either doing what the psychologists call projecting, or…I don’t know. Anyway, I’m certainly not pigeon-holeing PowerShell to be one or the other. It is and shall always be, a platform with the flexibility inherent in that term. The irony is that when I make a suggestion about the language, and I get sort of befuddled responses of “why the heck would anyone ever want to do that?” (made even more ironic by the fact that my suggestion described behavior that was changed), it makes me wonder what am I doing differently that my INCREDIBLY OBVIOUS suggestion isn’t seen instantly as such by my peers. I thought about it for a minute, and the premise of this poll is what I decided might be the cause.

I personally am very heavy on the shell side in how I ordinarily use PowerShell, I’ve always known this. That makes me value certain shell-oriented features more highly than others. (Duh.) That’s all. I’m just curious as to the distribution. Would love to get more responses.

How about C) Use the ISE with Script Pane Maximized and switch back and forth between the script and console panes frequently?

In fact, I usually have several concurrent open instances of the ISE in this mode, often with several scripts open in each.

I’d say about 70:30 script to shell in my environment. Usually I am supporting other projects or putting together scripts that will be used in scheduled jobs for reporting and other things or being provided to others to use. For some things like querying Active Directory or pulling information from WMI, I usually just stick with the shell. I also use the shell for testing out the scripts that I write.

90:10 script to shell in my environment. My collegs fear the console and scripting so I have to build tools for the colored pixel clickers :wink: