What is Microsoft Powershell ? How Can I Automate Tasks?
PowerShell is a task automation and configuration management provided by Microsoft for Windows Operating systems. Powershell provides interactive shell for issuing commands. Powershell platform also provides scripting language.
Powershell have access to the underlying operating system components like
WS-Management etc. Powershell is developed in .Net framework.
Powershell started developing in 2003 but it takes some time to release first version.
First version released in 2006 and supported operating systems are
- Windows XP SP2,
- Windows Server 2003 SP1,
- Windows Vista
Powershell 2.0 is integrated with Windows 7 and Windows Server 2008 R2 . The following new features are added to the v2
Powershell Remotingwill enabled scripts and cmdlets to run remote systems
Background Jobsallow run scripts asynchronously
Transactionswill added and can be used for write operations like registry
Modulesare used to organize scripts and script files in a name space manner.
Script Debuggingis used to trouble shot scripts while running
Eventingis an other useful feature used to listening, forwarding management and system events
Integrate Scripting Environmentis a tool used to write, run and debug Powershell scripts.
Network File transfercan transfer files to remote systems.
Powershell version 3 is integrated to the Windows 8 and Windows Server 2012 and following features are added
Scheduled Jobsis very useful feature added in this version
Code Completionis used to auto complete or suggest commands
Version 4.0 comes with Windows 8.1 and Windows Server 2012 R2
Desired State Configurationallow to specify end configuration of a service
ForEachkeywords for loops
Version 5 have following features
Class Definitionwill enable more complex data structure creation
Enumerationis used to foreach in array like structures
Cmdlet or commandlets are specialized commands to implements specific functions. Cmdlet uses Verb-Noun pattern for naming. For example
Get-ChildItem express cmdlet function with verb
Get and noun
Integrate Shell Environment ISE
ISE is simple tool provided by Powershell to develop, run, debug Powershell scripts. It provides existing cmdlets help and auto completion to easy Powershell development job.