Day 1 Introduction to Powershell
PowerShell is the new command-line/scripting environment. The purpose of this is to automate the routine for Microsoft windows any task.
When Microsoft was increasing in enterprise and need to go beyond GUI for enterprise plateform for that it require simmiar programming like UNIX shell programming. As .net and C# are GUI programming which is more of user interface not command-line friendly and existing windows command line was not enough, so Powershell is build . Jeffrey Snover, Bruce Payette, James Truher are the founding members of Powershell.
With Powershell you can do everything and manage windows. We can use .NET, COM (Component Object Model), ADSI(active directory) and WMI(Windows Management Infrasturcture) objects in Powershell. PowerShell v1.0, released in late 2006,
Powershell is free tool, Powershell 2 is build it and is available with windows 2008 R2
For windows shell, Powershell is the utility.
Run “Powershell” with cmd will get you to Powershell prompt.
For Sql server Powershell utility run “SQLPS” command. Which will be free with sql server 2008 onwords
You can use sqlps to do the following:
- Interactively run PowerShell commands.
- Run PowerShell script files.
- Run SQL Server cmdlets.
- Use the SQL Server provider paths to navigate through the hierarchy of SQL Server objects