<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'DBA', 'SQL Server 2008', and 'PowerShell'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=DBA,SQL+Server+2008,PowerShell&amp;orTags=0</link><description>Search results matching tags 'DBA', 'SQL Server 2008', and 'PowerShell'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Start a SQL Server Agent Job using the SQL Server PowerShell Provider</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/02/10/start-a-sql-server-agent-job-using-the-sql-server-powershell-provider.aspx</link><pubDate>Wed, 10 Feb 2010 13:13:45 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22096</guid><dc:creator>BuckWoody</dc:creator><description>&lt;p&gt;Whew!&amp;#160; That’s a mouthfull. Anyway, I thought I would share part of a script I wrote today to help automate (more) from PowerShell. This assumes a few things: that you’re doing this from the SQL Server 2008 PowerShell provider (not just good old regular PowerShell) and that you change the HAL9000 and SQL2K8 parts with your server name and your Instance name. Oh, and the Jobs I start are called “Test” and then something else. That’s the Test* part. You can use a specific name and drop the * or use your own naming convention.&lt;/p&gt;  &lt;p&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;font size="2"&gt;&lt;font face="Calibri"&gt;&lt;font color="#800000"&gt;&lt;strong&gt;Script Disclaimer, for people who need to be told this sort of thing: &lt;/strong&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;font size="2"&gt;&lt;font face="Calibri"&gt;&lt;font color="#800000"&gt;Never trust any script, including those that you find here, until you understand exactly what it does and how it will act on your systems. Always check the script on a test system or Virtual Machine, not a production system. All scripts on this site are performed by a professional stunt driver on a closed course. Your mileage may vary. Void where prohibited. Offer good for a limited time only. Keep out of reach of small children. Do not operate heavy machinery while using this script. If you experience blurry vision, indigestion or diarrhea during the operation of this script, see a physician immediately. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;# Start a Job named Test in the SQL Server 2008 PowrShell Provider&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;DIR SQLSERVER:\SQL\HAL9000\SQL2K8\JobServer\Jobs\Test* | % {$_.Start()}&lt;/font&gt;&lt;/p&gt;</description></item></channel></rss>