NetInverse Developers Blog

March 7, 2009
Category: PowerShell — Tags: — admin @ 10:45 pm

Have you ever writen any BAT file or Perl script before? Now it’s time to use Windows PowerShell instead! It’s a powerful tool for writing automation scripts like build or pre-processing, etc. It’s extremely fun to use it since it’s .Net based and supports Xml and objects.

Microsoft Windows PowerShell command line shell and scripting language helps IT Professionals achieve greater productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT Professionals to more easily control system administration and accelerate automation. Windows PowerShell is easy to adopt, learn, and use, because it works with your existing IT infrastructure and existing script investments, and because it runs on Windows XP, Windows Vista, Windows Server 2003 and Windows Server Longhorn. Exchange Server 2007, System Center Operations Manager 2007, System Center Data Protection Manager V2, and System Center Virtual Machine Manager leverage Windows PowerShell to improve efficiency and productivity.

In short: PowerShell

  • exposes the power of .NET via a command line environment and scripting language
  • allows you to pipe objects from one command to another!
  • provides powerful supports of XML handling and regular expressions

    Get Started:

    Download Powershell from Microsoft first. Write and run a script. You can run following command to allow you to run unsigned scripts on your local machine.

            PS C:\> Set-ExecutionPolicy RemoteSigned

    To create a script, just make a text file with the .ps1 extension, like MyBuild.ps1. To run it, you need to type the full path to the script or use .\filename, like .\MyBuild.

    Download info for Powershell.

  • ©2009 NetInverse. All rights reserved. Powered by WordPress