Can I? Should I?

The question “Can I do X with PowerShell?” comes up very frequently.

PowerShell provides access to a huge range of functionality:

  • .NET
  • COM
  • WMI
  • Microsoft and third party products

Usually the answer is “Yes, you can”


What doesn’t seem to be considered so often is the question “Should I do X with PowerShell?”

If you don’t have alternatives then by all means try it but if there are better ways to accomplish the task then consider them.

If all you have is PowerShell everything looks like a script

This entry was posted in Philosophy, PowerShell V2. Bookmark the permalink.

1 Response to Can I? Should I?

  1. Klaas says:

    Hi Richard

    I know it was a Sunday, but this seems to be just the introduction of what could be an entire chapter in your next book or at least one of the most interesting blog posts this year.
    ‘if there is a better way, use something else’, I knew that already. Problem is, concearning Powershell, only a handfull of people know the secret decision making flow chart to define the best way. I know you’re one of them, so, Richard, can you please teach us how to find the best way?
    Should I use SMO, DBCC, SQLPSX, invoke-sqlcmd, WMI, or … to collect SQL information?
    nslookup or dnsshell module? ADcmdlets, QAD snapin, .NET, LDAP, BSOnPosh module, sysinternals,… ?
    Is using modules not in conflict with reuseability? Are there performance issues with certain methods?
    I’ve been using Powershell for three years, but I still don’t know a thing. Please enlighten me.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s