ENTRIES TAGGED "powershell"

PowerShell Command Line Introduction

Effectively control Windows from the console

Here’s a slick PowerShell 3.0 one-liner. If you want to pull down an RSS feed from a blog, displaying only the title and publication date try:

powershell-0

It’s that simple. No looping, no checking end of stream, no XSLT to handle transforming the XML from the RSS feed, but wait, there’s more. This array of objects is now connected to the entire PowerShell ecosystem. PowerShell is based on .NET so you can use ADO.NET to insert it into a database, use Invoke-RestMethod again and post it to another REST endpoint or spin up Microsoft Excel and control it via its COM API. And that my friends, is the two foot dive into the PowerShell ocean.

PowerShell is Microsoft’s task automation framework, consisting of a command-line shell, an integrated scripting environment (ISE), a scripting language built on .NET Framework, an API allowing you to host PowerShell in your .NET applications, and it is a distributed automation platform. This means if you have PowerShell running on another box, you can remotely execute PowerShell there, if you have the credentials.

Getting started

What you need to do is launch the PowerShell console. On my Windows 8 box I press the Windows button, type “powers“, and hit enter.

powershell-1

Great! I’ve got a blank blue screen. Now what?
Read more…

Comment |

PowerShell for developers

Doug Finke on why PowerShell isn't just for administrators.

Doug Finke (@dfinke) is an O’Reilly author and software developer. He moderates a PowerShell for Developers forum at powershell.org.

We sat down recently to talk about the PowerShell, which has a new version launching with Windows 8 and Windows Server 2012, and how it has grown with this latest release.

Key points from the full video interview include:

  • New to PowerShell v3: Workflows and many, many more cmdlets [Discussed at the 0:39 mark]
  • Streamline larger programs by incorporating PowerShell [Discussed at the 2:15 mark]
  • Automation equals repeatability [Discussed at the 3:40 mark]
  • PowerShell has a passionate community [Discussed at the 5:41 mark]
  • What does the future hold for PowerShell? [Discussed at the 7:16 mark]

You can view the entire interview in the following video.

Read more…

Comment |