SQL Server 2008: PowerShell (PSH) Integration


Before I get into this new SQL Server 2008 feature I want to briefly review why we have a new command-line in the Windows platform…In the current Windows ‘landscape’ we have a variety of technologies that can be used to programmatically administer various Windows data stores:
1.       MS-DOS and Batch Files
2.       Windows Script Host
3.       VBScript/Jscript & COM Object Models
4.       CLR Languages & Managed Object Models
This current Windows programmatic administrative environment is a mess to say the least and when you need to incorporate multiple data stores into a single ‘script’ it can be more challenging. What is needed is a single environment for administrators to easily manage and manipulate the various data stores.
Enter Windows PSH…with PSH we have an extensible, unified, command-line environment for programmatic administration of the Windows platform! Through the development and use of PSH ‘Providers’, both Microsoft and the larger community can continually adapt PSH to more repositories on the Windows platform! And like most new Windows components, the new command-line is built on top of the .Net Framework and the underlying CLR.
I will not delve into the details of PSH, please see the Resources section of this blog post to find the product specific documentation. You should become familiar with concepts such as cmdlets, providers, and the associated PSH scripting language. There is plenty of good content already out there on these topics.
I read somewhere (on a blog), someone labeled the SQL Server 2008 PSH Integration as a ‘sleeper feature’ and I have to agree. While in the PSH marketing material, the technology is being touted as one of the quickest adopted technologies, in the real-world I’ve yet to come across its real-world use. I am sure there are many organizations currently using PSH; however I do doubt the current marketing statements about its overall community adoption. Very few folks I work with know anything beyond the product’s name, little alone what SQL Server 2008 provides in the way of PSH and thus this blog post.
So what does SQL Server 2008 provide us with in the way of ‘PSH Integration’? Plenty (for a V1 feature)…
1.       Full Relational Engine & Policy Navigation & Manipulation (this is done via the SMO/Policy Managed classes and is implemented via PSH providers)
2.       Object Explorer in Management Studio allows you to start a new PSH session using the current context of the relational engine hierarchy.
3.       A new SQL Server Agent PSH native job step
4.       A new cmdlet for invoking TSQL or XQuery statements
So what does the new feature not provide…Replication/SSIS/SSAS Navigation/Manipulation! There is however a community built SSAS 2005|2008 PSH provider, the link can be found in the resources section of this post. Essentially, we have functionality that is exposed via the SMO and new policy classes and thus functionality entailed in RMO, the DTS/SSIS managed classes, and the AMO object model are not yet exposed via a PSH provider (at least not out-of-the-box).
PSH & SQL Server 2008 PSH Integration Resources:
1.       PSH Homepage
2.       PSH Team Blog
3.       PSH 1.0 DL Page
4.       PSH Scripts Repository
5.       SQL Server 2008 PSH TechNet Homepage
6.       SQL Server Analysis Services 2005|2008 PSH Provider via CodePlex

Print | posted on Tuesday, May 27, 2008 3:52 PM


# re: SQL Server 2008: PowerShell (PSH) Integration

Left by Darlove at 10/24/2008 6:34 AM
Gravatar Just one thing to say: PoSH is fantabulous! I have used it in our company since the first official release and will never come back to VBScript or JScript. It's universal, well-thought and well-designed, can easily interact with COM, .NET, WMI, SMO, the Registry and many more in a standardized way. One word of caution, though: If you start using it, pay good attention to its type promiscuosity and variable scoping rules which are so different from those of statically typed languages like C# or VB.NET...

# re: SQL Server 2008: PowerShell (PSH) Integration

Left by columbia jackets at 10/21/2010 4:17 PM
Gravatar the DTS/SSIS managed classes, and the AMO object model are not yet exposed via a PSH provider (at least not out-of-the-box).

snow boots for women | columbia sportswear outlet | cheap mac makeup | the north face jackets

womens snow boots | columbia sportswear | cheap makeup | cheap north face jackets

# dyppyt

Left by hgfjtzwehmd at 2/6/2012 4:22 PM
Gravatar sR82bA knqhkwgbcueu, [url=http://qtbchkqjrfgs.com/]qtbchkqjrfgs[/url], [link=http://ilfuexkcfpwe.com/]ilfuexkcfpwe[/link], http://zulynbtnfafo.com/

# hopbebcm

Left by Gjlclass at 2/8/2012 1:09 PM
Gravatar obagi gratuits - gratuits

# gdbigzalh

Left by Cftcgrcx at 2/9/2012 12:52 AM
Gravatar maneuvers payday - payday

# rgiyb

Left by Dultghxi at 2/25/2012 1:51 PM
Gravatar usnews wellbutrin kaufen - wellbutrin kaufen

# ascyyims

Left by Samcnyzq at 2/26/2012 2:42 AM
Gravatar powertec acheter periactin - acheter periactin

# hlhryuyg

Left by Daxboxut at 2/26/2012 2:06 PM
Gravatar sandro comprar micardis - comprar micardis

# gscmlwul

Left by Yzztozwk at 2/26/2012 8:37 PM
Gravatar anthrax acquisto sleepwell - acquisto sleepwell
Comments have been closed on this topic.

Copyright © Derek Comingore

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski