110 likes | 296 Views
Introduction to Powershell. Martin Bell SQL Server MVP Email: Martin.Bell@BTInternet.com Blog: http://sqlblogcasts.com/blogs/martinbell/. What is POWERSHELL?. Windows PowerShell is a powerful scripting shell
E N D
Introduction to Powershell Martin Bell SQL Server MVP Email: Martin.Bell@BTInternet.com Blog: http://sqlblogcasts.com/blogs/martinbell/
What is POWERSHELL? • Windows PowerShell is a powerful scripting shell • The Windows PowerShell language supports more complex logic than Transact-SQL scripts
What is ExtraS ARE Provided for SQL Server? • The SQL Server provider enables a simple navigation mechanism similar to file system paths • A set of SQL Server cmdlets • SQLPS is a closed mini-shell
What is SQLPS? • The sqlps utility that is used to run Windows PowerShell sessions that include the SQL Server snap-ins
What is SUPPORTED? • For SQLPS install the SQL Server 2008 client components to run SQL Server features for Windows PowerShell • The SQL Server provider for Windows PowerShell can connect to instances of SQL Server 2008, SQL Server 2005 (SP2 or later), or SQL Server 2000 (SP4). • Some functionality is limited on SQL Server 2005 and SQL Server 2000
What CAN you DO with these? • Manage SQL Server instances • Manage Policies, Start Services... • Manage Databases • Backup, Create, Change Delete... • Manage Jobs • Use SMO, WMI ...
Demo • Finding your way around SQLPS
Resources • Quest- PowerGUI and Scripts http://www.quest.com/powershell/ • Idera – Free Powershell Scripts www.idera.com/Products/Free-Tools/PowerShell-scripts/ • SQLPSX - http://sqlpsx.codeplex.com/ • SQL Server Books Online - http://go.microsoft.com/fwlink/?LinkId=115604 • Powershell Owners Manual http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/start.mspx
References • Martin Bell’s Blog - http://sqlblogcasts.com/blogs/martinbell/ • Bill Ramos’ Blog -http://blogs.msdn.com/billramo/default.aspx • Carpe Datum – Buck Woody’s Blog - http://blogs.msdn.com/buckwoody/ • Allen White’s Blog - http://sqlblog.com/blogs/allen_white • MichielWoriesWebLog –http://blogs.msdn.com/mwories/default.aspx • And…