<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>SQLPSX Work Item Rss Feed</title><link>http://www.codeplex.com/SQLPSX/WorkItem/List.aspx</link><description>SQLPSX Work Item Rss Description</description><item><title>Edited Unassigned: Get-SqlServer issues [8]</title><link>http://sqlpsx.codeplex.com/workitem/8</link><description>I&amp;#39;m new to SQLPSX, but in trying to follow an example on someones site&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Import-Module sqlmaint&lt;br /&gt;&amp;#36;SQLServer &amp;#61; &amp;#34;localhost&amp;#34;&lt;br /&gt;&amp;#36;SQLDBName &amp;#61; &amp;#34;work&amp;#34;&lt;br /&gt;&amp;#36;SQLQuery &amp;#61; &amp;#34;SELECT &amp;#42; FROM dbo.server&amp;#34;&lt;br /&gt;&lt;br /&gt; &amp;#36;database &amp;#61; Get-SqlDatabase &amp;#36;sqlserver &amp;#36;SQLDBName&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;I get the error&amp;#58; &lt;br /&gt;Exception calling &amp;#34;Contains&amp;#34; with &amp;#34;1&amp;#34; argument&amp;#40;s&amp;#41;&amp;#58; &amp;#34;Failed to connect to server server&amp;#61;&amp;#39;localhost&amp;#39;&amp;#59;Trusted_Connection&amp;#61;true&amp;#59;multipleactiveresultsets&amp;#61;false.&amp;#34;&lt;br /&gt;At C&amp;#58;&amp;#92;Users&amp;#92;ZierdE1&amp;#92;Documents&amp;#92;WindowsPowerShell&amp;#92;Modules&amp;#92;sqlserver&amp;#92;SQLServer.psm1&amp;#58;164 char&amp;#58;37&lt;br /&gt;&amp;#43;     &amp;#123; if &amp;#40;&amp;#36;server.Databases.Contains &amp;#60;&amp;#60;&amp;#60;&amp;#60; &amp;#40;&amp;#34;&amp;#36;dbname&amp;#34;&amp;#41; -and &amp;#36;server.Databases&amp;#91;&amp;#36;dbname&amp;#93;.IsAccessible&amp;#41;&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; NotSpecified&amp;#58; &amp;#40;&amp;#58;&amp;#41; &amp;#91;&amp;#93;, MethodInvocationException&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; DotNetMethodException&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve tracked this down to the Get-SqlServer function.  The current function performs the following&amp;#58;&lt;br /&gt;    &amp;#36;server &amp;#61; new-object &amp;#40;&amp;#34;Microsoft.SqlServer.Management.Smo.Server&amp;#34;&amp;#41; &amp;#36;con&lt;br /&gt;&lt;br /&gt;I believe the issue is with the &amp;#36;con variable.  &amp;#36; con is set in the Get-SQLConnection function, where it does&amp;#58; &lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&amp;#36;con &amp;#61; new-object &amp;#40;&amp;#34;Microsoft.SqlServer.Management.Common.ServerConnection&amp;#34;&amp;#41; &amp;#36;sqlserver&lt;br /&gt;&amp;#36;con.Connect&amp;#40;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;The code works if I change the Get-SqlServer function code from&amp;#58; &lt;br /&gt;    &amp;#36;server &amp;#61; new-object &amp;#40;&amp;#34;Microsoft.SqlServer.Management.Smo.Server&amp;#34;&amp;#41; &amp;#36;con&lt;br /&gt;&lt;br /&gt;to&amp;#58;&lt;br /&gt;&lt;br /&gt;    &amp;#36;server &amp;#61; new-object &amp;#40;&amp;#34;Microsoft.SqlServer.Management.Smo.Server&amp;#34;&amp;#41; &amp;#36;sqlserver&lt;br /&gt;&lt;br /&gt;So if I give it a server name, instead of a Connection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;according to get-host&amp;#124;Select-Object version I am running version 3.6.0.8&lt;br /&gt;&lt;br /&gt;I&amp;#39;m including a screen shot of both the failure and success in a simplified query...sorry that it looks distorted.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description><author>zierde01</author><pubDate>Thu, 02 May 2013 19:51:32 GMT</pubDate><guid isPermaLink="false">Edited Unassigned: Get-SqlServer issues [8] 20130502075132P</guid></item><item><title>Created Unassigned: Get-SqlConnection issues [8]</title><link>http://sqlpsx.codeplex.com/workitem/8</link><description>I&amp;#39;m new to SQLPSX, but in trying to follow an example on someones site&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Import-Module sqlmaint&lt;br /&gt;&amp;#36;SQLServer &amp;#61; &amp;#34;localhost&amp;#34;&lt;br /&gt;&amp;#36;SQLDBName &amp;#61; &amp;#34;work&amp;#34;&lt;br /&gt;&amp;#36;SQLQuery &amp;#61; &amp;#34;SELECT &amp;#42; FROM dbo.server&amp;#34;&lt;br /&gt;&lt;br /&gt; &amp;#36;database &amp;#61; Get-SqlDatabase &amp;#36;sqlserver &amp;#36;SQLDBName&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&lt;br /&gt;I get the error&amp;#58; &lt;br /&gt;Exception calling &amp;#34;Contains&amp;#34; with &amp;#34;1&amp;#34; argument&amp;#40;s&amp;#41;&amp;#58; &amp;#34;Failed to connect to server server&amp;#61;&amp;#39;localhost&amp;#39;&amp;#59;Trusted_Connection&amp;#61;true&amp;#59;multipleactiveresultsets&amp;#61;false.&amp;#34;&lt;br /&gt;At C&amp;#58;&amp;#92;Users&amp;#92;ZierdE1&amp;#92;Documents&amp;#92;WindowsPowerShell&amp;#92;Modules&amp;#92;sqlserver&amp;#92;SQLServer.psm1&amp;#58;164 char&amp;#58;37&lt;br /&gt;&amp;#43;     &amp;#123; if &amp;#40;&amp;#36;server.Databases.Contains &amp;#60;&amp;#60;&amp;#60;&amp;#60; &amp;#40;&amp;#34;&amp;#36;dbname&amp;#34;&amp;#41; -and &amp;#36;server.Databases&amp;#91;&amp;#36;dbname&amp;#93;.IsAccessible&amp;#41;&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; NotSpecified&amp;#58; &amp;#40;&amp;#58;&amp;#41; &amp;#91;&amp;#93;, MethodInvocationException&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; DotNetMethodException&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve tracked this down to the Get-SqlServer function.  The current function performs the following&amp;#58;&lt;br /&gt;    &amp;#36;server &amp;#61; new-object &amp;#40;&amp;#34;Microsoft.SqlServer.Management.Smo.Server&amp;#34;&amp;#41; &amp;#36;con&lt;br /&gt;&lt;br /&gt;I believe the issue is with the &amp;#36;con variable.  &amp;#36; con is set in the Get-SQLConnection function, where it does&amp;#58; &lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;&amp;#36;con &amp;#61; new-object &amp;#40;&amp;#34;Microsoft.SqlServer.Management.Common.ServerConnection&amp;#34;&amp;#41; &amp;#36;sqlserver&lt;br /&gt;&amp;#36;con.Connect&amp;#40;&amp;#41;&lt;br /&gt;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;The code works if I change the Get-SqlServer function code from&amp;#58; &lt;br /&gt;    &amp;#36;server &amp;#61; new-object &amp;#40;&amp;#34;Microsoft.SqlServer.Management.Smo.Server&amp;#34;&amp;#41; &amp;#36;con&lt;br /&gt;&lt;br /&gt;to&amp;#58;&lt;br /&gt;&lt;br /&gt;    &amp;#36;server &amp;#61; new-object &amp;#40;&amp;#34;Microsoft.SqlServer.Management.Smo.Server&amp;#34;&amp;#41; &amp;#36;sqlserver&lt;br /&gt;&lt;br /&gt;So if I give it a server name, instead of a Connection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;according to get-host&amp;#124;Select-Object version I am running version 3.6.0.8&lt;br /&gt;&lt;br /&gt;I&amp;#39;m including a screen shot of both the failure and success in a simplified query...sorry that it looks distorted.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description><author>zierde01</author><pubDate>Thu, 02 May 2013 19:50:51 GMT</pubDate><guid isPermaLink="false">Created Unassigned: Get-SqlConnection issues [8] 20130502075051P</guid></item><item><title>Edited Issue: Unapproved Verbs Used - should be fixed [7]</title><link>http://sqlpsx.codeplex.com/workitem/7</link><description>There are two cmdlets&amp;#47;functiosn with unapproved verb names&amp;#58;&lt;br /&gt;&lt;br /&gt;Decode-SQLName&lt;br /&gt;Encode-SQLName&lt;br /&gt;&lt;br /&gt;To see this, after loading SQLPS, do this from a PowerShell prompt&amp;#58;&lt;br /&gt;&lt;br /&gt;Import-Modue SQLPS -Verbose -Force&lt;br /&gt;&lt;br /&gt;IMHO, community modules, like this one, really need to follow things like approved verbs and not expect users to have to &amp;#39;ignore errors&amp;#39;. The commuynity can, and should, do better.&lt;br /&gt;</description><author>tfl</author><pubDate>Mon, 25 Feb 2013 10:21:39 GMT</pubDate><guid isPermaLink="false">Edited Issue: Unapproved Verbs Used - should be fixed [7] 20130225102139A</guid></item><item><title>Created Issue: Unapproved Verbs Used - should be fixed [7]</title><link>http://sqlpsx.codeplex.com/workitem/7</link><description>There are two cmdlets&amp;#47;functiosn with unapproved verb names&amp;#58;&lt;br /&gt;&lt;br /&gt;Decode-SQLName&lt;br /&gt;Encode-SQLName&lt;br /&gt;&lt;br /&gt;To see this, after loading SQLPS, do this from a PowerShell prompt&amp;#58;&lt;br /&gt;&lt;br /&gt;Import-Modue SQLPS -Verbose -Force&lt;br /&gt;</description><author>tfl</author><pubDate>Mon, 25 Feb 2013 10:16:01 GMT</pubDate><guid isPermaLink="false">Created Issue: Unapproved Verbs Used - should be fixed [7] 20130225101601A</guid></item><item><title>Created Issue: SQLPSX error, add-Member : Cannot add a member [6]</title><link>http://sqlpsx.codeplex.com/workitem/6</link><description>See &amp;#91;http&amp;#58;&amp;#47;&amp;#47;social.technet.microsoft.com&amp;#47;Forums&amp;#47;en&amp;#47;sqlkjmanageability&amp;#47;thread&amp;#47;be63367b-306e-4ab3-a48b-b0bb8be745ee&amp;#93;&amp;#40;http&amp;#58;&amp;#47;&amp;#47;social.technet.microsoft.com&amp;#47;Forums&amp;#47;en&amp;#47;sqlkjmanageability&amp;#47;thread&amp;#47;be63367b-306e-4ab3-a48b-b0bb8be745ee&amp;#41;&lt;br /&gt;&lt;br /&gt;Need to add a type file to module in order to avoid add-member issue.&lt;br /&gt;&lt;br /&gt;</description><author>cmille19</author><pubDate>Mon, 11 Feb 2013 16:02:09 GMT</pubDate><guid isPermaLink="false">Created Issue: SQLPSX error, add-Member : Cannot add a member [6] 20130211040209P</guid></item><item><title>Created Issue: Win7 x64 + SQL2012 rtm load errors for DTS and RMO [5]</title><link>http://sqlpsx.codeplex.com/workitem/5</link><description>I have this fresh install of Win7 x64 with only a client install &amp;#40; except the add-in s &amp;#41; of SQL2012.&lt;br /&gt;&amp;#40;My PowerGUI has been configured to actually use Powershell V3.0&amp;#41;&lt;br /&gt;&lt;br /&gt;Now, when I load SQLPSx it generates following errors&amp;#58;&lt;br /&gt;&lt;br /&gt;add-type &amp;#58; Could not load file or assembly &amp;#39;Microsoft.SqlServer.Rmo, Version&amp;#61;9.0.242.0, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;89845dcd8080cc91&amp;#39; or one of its dependencies. The s&lt;br /&gt;ystem cannot find the file specified.&lt;br /&gt;At C&amp;#58;&amp;#92;Users&amp;#92;ADM-B0729&amp;#92;Documents&amp;#92;WindowsPowerShell&amp;#92;Modules&amp;#92;Repl&amp;#92;Repl.psm1&amp;#58;17 char&amp;#58;8&lt;br /&gt;&amp;#43; catch &amp;#123;add-type -AssemblyName &amp;#34;Microsoft.SqlServer.Rmo&amp;#34;&amp;#125;&lt;br /&gt;&amp;#43;        &amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; NotSpecified&amp;#58; &amp;#40;&amp;#58;&amp;#41; &amp;#91;Add-Type&amp;#93;, FileNotFoundException&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.AddTypeCommand&lt;br /&gt; &lt;br /&gt;No Oracle found&lt;br /&gt;Loading SQLPSX Module - SQLmaint&lt;br /&gt;Loading SQLPSX Module - SQLServer&lt;br /&gt;Loading SQLPSX Module - Agent&lt;br /&gt;Loading SQLPSX Module - Repl&lt;br /&gt;Loading SQLPSX Module - SSIS&lt;br /&gt;add-type &amp;#58; Cannot add type. The assembly &amp;#39;Microsoft.SqlServer.ManagedDTS, Version&amp;#61;10.0.0.0, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;89845dcd8080cc91&amp;#39; could not be found.&lt;br /&gt;At C&amp;#58;&amp;#92;Users&amp;#92;ADM-B0729&amp;#92;Documents&amp;#92;WindowsPowerShell&amp;#92;Modules&amp;#92;SSIS&amp;#92;SSIS.psm1&amp;#58;21 char&amp;#58;5&lt;br /&gt;&amp;#43;     add-type -AssemblyName &amp;#34;Microsoft.SqlServer.ManagedDTS, Version&amp;#61;10.0.0.0, Cu ...&lt;br /&gt;&amp;#43; &amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; ObjectNotFound&amp;#58; &amp;#40;Microsoft.SqlSe...9845dcd8080cc91&amp;#58;String&amp;#41; &amp;#91;Add-Type&amp;#93;, Exception&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; ASSEMBLY_NOT_FOUND,Microsoft.PowerShell.Commands.AddTypeCommand&lt;br /&gt; &lt;br /&gt;add-type &amp;#58; Cannot add type. One or more required assemblies are missing.&lt;br /&gt;At C&amp;#58;&amp;#92;Users&amp;#92;ADM-B0729&amp;#92;Documents&amp;#92;WindowsPowerShell&amp;#92;Modules&amp;#92;SSIS&amp;#92;SSIS.psm1&amp;#58;21 char&amp;#58;5&lt;br /&gt;&amp;#43;     add-type -AssemblyName &amp;#34;Microsoft.SqlServer.ManagedDTS, Version&amp;#61;10.0.0.0, Cu ...&lt;br /&gt;&amp;#43; &amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; InvalidData&amp;#58; &amp;#40;&amp;#58;&amp;#41; &amp;#91;Add-Type&amp;#93;, InvalidOperationException&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; ASSEMBLY_LOAD_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand&lt;br /&gt; &lt;br /&gt;Loading SQLPSX Module - Showmbrs&lt;br /&gt;Loading SQLPSX Module - SQLParser&lt;br /&gt;Loading SQLPSX Module - adolib&lt;br /&gt;Loading SQLPSX Modules is Done&amp;#33;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I altered following SQLPSx components to be able to get the load done without errors&amp;#58;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve altered the repl.psm1 so it uses the 11.0 types&lt;br /&gt;&lt;br /&gt;try &amp;#123;add-type -AssemblyName &amp;#34;Microsoft.SqlServer.ConnectionInfo, Version&amp;#61;11.0.0.0, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;89845dcd8080cc91&amp;#34; -EA Stop&amp;#125;&lt;br /&gt;catch &amp;#123;add-type -AssemblyName &amp;#34;Microsoft.SqlServer.ConnectionInfo&amp;#34;&amp;#125;&lt;br /&gt;try &amp;#123;add-type -AssemblyName &amp;#34;Microsoft.SqlServer.Rmo, Version&amp;#61;11.0.0.0, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;89845dcd8080cc91&amp;#34; -EA Stop&amp;#125;&lt;br /&gt;catch &amp;#123;add-type -AssemblyName &amp;#34;Microsoft.SqlServer.Rmo&amp;#34;&amp;#125;&lt;br /&gt;&lt;br /&gt;For the DTS stuff I altered the SSIS.psm1 so it uses&amp;#58;&lt;br /&gt;&lt;br /&gt;if &amp;#40; &amp;#36;Args&amp;#91;0&amp;#93; -eq 2005 &amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;    add-type -AssemblyName &amp;#34;Microsoft.SqlServer.ManagedDTS, Version&amp;#61;9.0.242.0, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;89845dcd8080cc91&amp;#34;&lt;br /&gt;    &amp;#35;add-type -Path &amp;#34;C&amp;#58;&amp;#92;Program Files&amp;#92;Microsoft SQL Server&amp;#92;90&amp;#92;SDK&amp;#92;Assemblies&amp;#92;Microsoft.SQLServer.ManagedDTS.dll&amp;#34;&lt;br /&gt;&amp;#125;&lt;br /&gt;elseif &amp;#40; &amp;#36;Args&amp;#91;0&amp;#93; -eq 2008 &amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;    add-type -AssemblyName &amp;#34;Microsoft.SqlServer.ManagedDTS, Version&amp;#61;10.0.0.0, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;89845dcd8080cc91&amp;#34;&lt;br /&gt;    &amp;#35;add-type -Path &amp;#34;C&amp;#58;&amp;#92;Program Files&amp;#92;Microsoft SQL Server&amp;#92;100&amp;#92;SDK&amp;#92;Assemblies&amp;#92;Microsoft.SQLServer.ManagedDTS.dll&amp;#34;&lt;br /&gt;&amp;#125;&lt;br /&gt;else&lt;br /&gt;&amp;#123;&lt;br /&gt;    add-type -AssemblyName &amp;#34;Microsoft.SqlServer.ManagedDTS, Version&amp;#61;11.0.0.0, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;89845dcd8080cc91&amp;#34;&lt;br /&gt;    &amp;#35;add-type -Path &amp;#34;C&amp;#58;&amp;#92;Program Files&amp;#92;Microsoft SQL Server&amp;#92;110&amp;#92;SDK&amp;#92;Assemblies&amp;#92;Microsoft.SQLServer.ManagedDTS.dll&amp;#34;&lt;br /&gt;&amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now SQLPSx doesn&amp;#39;t show errors at load time.&lt;br /&gt;&lt;br /&gt;I hope that was all it needed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description><author>ALZDBA</author><pubDate>Thu, 06 Dec 2012 09:15:45 GMT</pubDate><guid isPermaLink="false">Created Issue: Win7 x64 + SQL2012 rtm load errors for DTS and RMO [5] 20121206091545A</guid></item><item><title>Created Issue: Invoke-SqlRestore should kill connections to the database [4]</title><link>http://sqlpsx.codeplex.com/workitem/4</link><description>During the execution of Invoke-SqlRestore, it should kill any connections to that database so the restore will finish.  A parameter to the function could also be made or just use the exising &amp;#39;-force&amp;#39; parameter.&lt;br /&gt;&lt;br /&gt;I added the following lines to SQLServer.psm1 at line 2757 and it accomplished the goal.&lt;br /&gt;&lt;br /&gt;    switch &amp;#40;&amp;#36;sqlserver.GetType&amp;#40;&amp;#41;.Name&amp;#41;&lt;br /&gt;    &amp;#123;&lt;br /&gt;        &amp;#39;String&amp;#39; &amp;#123; &amp;#36;server &amp;#61; Get-SqlServer &amp;#36;sqlserver &amp;#125;&lt;br /&gt;        &amp;#39;Server&amp;#39; &amp;#123; &amp;#36;server &amp;#61; &amp;#36;sqlserver &amp;#125;&lt;br /&gt;        default &amp;#123; throw &amp;#39;Invoke-SqlRestore&amp;#58;Param sqlserver must be a String or Server object.&amp;#39; &amp;#125;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#35;new code starts here&lt;br /&gt;&amp;#9;if &amp;#40;&amp;#36;force&amp;#41;&lt;br /&gt;&amp;#9;&amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;Write-Verbose &amp;#34;killing all processes for this database &amp;#36;&amp;#40;&amp;#36;server.Name&amp;#41; &amp;#36;dbname&amp;#34;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#36;server.KillAllProcesses&amp;#40;&amp;#36;dbname&amp;#41;&lt;br /&gt;&amp;#9;&amp;#125;&lt;br /&gt;&amp;#35;new code ends here&lt;br /&gt;    Write-Verbose &amp;#34;Invoke-SqlRestore &amp;#36;&amp;#40;&amp;#36;server.Name&amp;#41; &amp;#36;dbname&amp;#34;&lt;br /&gt;&lt;br /&gt;please consider this for the next release - if there is one.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description><author>dholmes</author><pubDate>Mon, 12 Nov 2012 16:51:58 GMT</pubDate><guid isPermaLink="false">Created Issue: Invoke-SqlRestore should kill connections to the database [4] 20121112045158P</guid></item><item><title>Created Issue: Property visibilty not found on W7 64-bit &amp; PowerShell V3 in sqlise connect dialog [3]</title><link>http://sqlpsx.codeplex.com/workitem/3</link><description>In SQLISE when I open the Connect dialog on Windows 7 64-bit with PowerShell V3, I get Property &amp;#34;Visibility&amp;#34; not found. As workaround I did the following modification to Get-ConnectionInfo.ps1&amp;#58;&lt;br /&gt;    -On_SelectionChanged &amp;#123;&amp;#36;userName &amp;#61; &amp;#36;window &amp;#124; Get-ChildControl userName&lt;br /&gt;                          &amp;#36;password &amp;#61; &amp;#36;window &amp;#124; Get-ChildControl Password&lt;br /&gt;                          if &amp;#40;&amp;#36;userName.Visibility&amp;#41;  &amp;#123; &amp;#35;&amp;#35; added&lt;br /&gt;                              if &amp;#40;&amp;#36;this.SelectedIndex -eq 1&amp;#41;&lt;br /&gt;                              &amp;#123;&lt;br /&gt;                                &amp;#36;userName.Visibility &amp;#61; &amp;#39;Visible&amp;#39;&amp;#59; &amp;#36;password.Visibility &amp;#61; &amp;#39;Visible&amp;#39;&lt;br /&gt;                              &amp;#125;&lt;br /&gt;                              else&lt;br /&gt;                              &amp;#123;&lt;br /&gt;                                &amp;#36;userName.Visibility &amp;#61; &amp;#39;Hidden&amp;#39;&amp;#59; &amp;#36;password.Visibility &amp;#61; &amp;#39;Hidden&amp;#39;&lt;br /&gt;                              &amp;#125;&lt;br /&gt;                            &amp;#125; &amp;#35;&amp;#35; added&lt;br /&gt;                        &amp;#125;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description><author>Bernd_K</author><pubDate>Sun, 04 Nov 2012 19:37:29 GMT</pubDate><guid isPermaLink="false">Created Issue: Property visibilty not found on W7 64-bit &amp; PowerShell V3 in sqlise connect dialog [3] 20121104073729P</guid></item><item><title>Commented Issue: Import-Module PerfCounters failes in Windows 8 with SQL Server 2012 [1]</title><link>http://sqlpsx.codeplex.com/workitem/1</link><description>Hi guys,&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve created a fresh install of Windows 8 and SQL Server 2012 and tried to install the SQLPSX modules version 2.3.2.1. When PerfCounters module is installed I receive the following error&amp;#58;&lt;br /&gt;&lt;br /&gt;At C&amp;#58;&amp;#92;Users&amp;#92;James&amp;#92;Documents&amp;#92;WindowsPowerShell&amp;#92;Modules&amp;#92;PerfCounters&amp;#92;PerfCounters.psm1&amp;#58;96 char&amp;#58;5&lt;br /&gt;&amp;#43;                 continue&lt;br /&gt;&amp;#43;                 &amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&lt;br /&gt;Control cannot leave a finally block.&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; ParserError&amp;#58; &amp;#40;&amp;#58;&amp;#41; &amp;#91;&amp;#93;, ParentContainsErrorRecordException&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; ControlLeavingFinally&lt;br /&gt; &lt;br /&gt;import-module &amp;#58; The specified module &amp;#39;PerfCounters&amp;#39; was not loaded because no valid module file was found in any module directory.&lt;br /&gt;At line&amp;#58;1 char&amp;#58;1&lt;br /&gt;&amp;#43; import-module PerfCounters&lt;br /&gt;&amp;#43; &amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; ResourceUnavailable&amp;#58; &amp;#40;PerfCounters&amp;#58;String&amp;#41; &amp;#91;Import-Module&amp;#93;, FileNotFoundException&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand&lt;br /&gt;&lt;br /&gt;I have a work around on my machine which is to remove the offending try finally block from the Get-ProcessPerfcounter function&amp;#58;&lt;br /&gt;&lt;br /&gt;try &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Invoke-Sqlcmd2 -ServerInstance &amp;#36;ServerName -Database &amp;#36;DatabaseName -UserName &amp;#36;UserName -Password &amp;#36;Password -Query &amp;#36;CommandInsertSQL&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125; finally &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;continue&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;leaving the Invoke-Sqlcmd2 intact as shown below&amp;#58;&lt;br /&gt;&lt;br /&gt;Invoke-Sqlcmd2 -ServerInstance &amp;#36;ServerName -Database &amp;#36;DatabaseName -UserName &amp;#36;UserName -Password &amp;#36;Password -Query &amp;#36;CommandInsertSQL&lt;br /&gt;&lt;br /&gt;I&amp;#39;m then able to import the modules successfully.&lt;br /&gt;&lt;br /&gt;If you need any further information please don&amp;#39;t hesitate to ask.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;James&lt;br /&gt;Comments: Hi James, I got this error and I already solved.It will be in the next version, but if you want you can contact me at laertesqldba&amp;#64;outlook.com and I will send to you  a new release to work with Posh 3.0</description><author>LaertePjunior</author><pubDate>Mon, 08 Oct 2012 22:35:26 GMT</pubDate><guid isPermaLink="false">Commented Issue: Import-Module PerfCounters failes in Windows 8 with SQL Server 2012 [1] 20121008103526P</guid></item><item><title>Created Issue: Overwriting backups breaking transaction log chain [2]</title><link>http://sqlpsx.codeplex.com/workitem/2</link><description>I&amp;#39;ve had an issue with SQLMaint module when with -Action &amp;#34;BKP_LOG&amp;#34; but it could have happened with other backup options. I do a transaction log backup every 15 minutes. When testing the restore plan I got an error because I was breaking the restore chain.&lt;br /&gt;I found that the problem was that the backup made in &amp;#34;pm&amp;#34; was overwritten by the one run in &amp;#34;am&amp;#34; because it happened at the very same time, speaking in minuts and seconds, just with a delay of 12 hours.&lt;br /&gt;&lt;br /&gt;I replace all &amp;#34;hh&amp;#34; for &amp;#34;HH&amp;#34; to be 24hours, for example&amp;#58;&lt;br /&gt;Get-Date -Format &amp;#34;yyyy&amp;#47;MM&amp;#47;dd hh&amp;#58;mm&amp;#58;ss&amp;#34;  for Get-Date -Format &amp;#34;yyyy&amp;#47;MM&amp;#47;dd HH&amp;#58;mm&amp;#58;ss&amp;#34;. I attach the file with the modification that I&amp;#39;ve done.&lt;br /&gt;&lt;br /&gt;Thank you&amp;#33;&lt;br /&gt;</description><author>josepmv</author><pubDate>Wed, 26 Sep 2012 10:38:02 GMT</pubDate><guid isPermaLink="false">Created Issue: Overwriting backups breaking transaction log chain [2] 20120926103802A</guid></item><item><title>Created Issue: Import-Module PerfCounters failes in Windows 8 with SQL Server 2012 [1]</title><link>http://sqlpsx.codeplex.com/workitem/1</link><description>Hi guys,&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve created a fresh install of Windows 8 and SQL Server 2012 and tried to install the SQLPSX modules version 2.3.2.1. When PerfCounters module is installed I receive the following error&amp;#58;&lt;br /&gt;&lt;br /&gt;At C&amp;#58;&amp;#92;Users&amp;#92;James&amp;#92;Documents&amp;#92;WindowsPowerShell&amp;#92;Modules&amp;#92;PerfCounters&amp;#92;PerfCounters.psm1&amp;#58;96 char&amp;#58;5&lt;br /&gt;&amp;#43;                 continue&lt;br /&gt;&amp;#43;                 &amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&lt;br /&gt;Control cannot leave a finally block.&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; ParserError&amp;#58; &amp;#40;&amp;#58;&amp;#41; &amp;#91;&amp;#93;, ParentContainsErrorRecordException&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; ControlLeavingFinally&lt;br /&gt; &lt;br /&gt;import-module &amp;#58; The specified module &amp;#39;PerfCounters&amp;#39; was not loaded because no valid module file was found in any module directory.&lt;br /&gt;At line&amp;#58;1 char&amp;#58;1&lt;br /&gt;&amp;#43; import-module PerfCounters&lt;br /&gt;&amp;#43; &amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; ResourceUnavailable&amp;#58; &amp;#40;PerfCounters&amp;#58;String&amp;#41; &amp;#91;Import-Module&amp;#93;, FileNotFoundException&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand&lt;br /&gt;&lt;br /&gt;I have a work around on my machine which is to remove the offending try finally block from the Get-ProcessPerfcounter function&amp;#58;&lt;br /&gt;&lt;br /&gt;try &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;Invoke-Sqlcmd2 -ServerInstance &amp;#36;ServerName -Database &amp;#36;DatabaseName -UserName &amp;#36;UserName -Password &amp;#36;Password -Query &amp;#36;CommandInsertSQL&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125; finally &amp;#123;&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#9;continue&lt;br /&gt;&amp;#9;&amp;#9;&amp;#9;&amp;#125;&lt;br /&gt;leaving the Invoke-Sqlcmd2 intact as shown below&amp;#58;&lt;br /&gt;&lt;br /&gt;Invoke-Sqlcmd2 -ServerInstance &amp;#36;ServerName -Database &amp;#36;DatabaseName -UserName &amp;#36;UserName -Password &amp;#36;Password -Query &amp;#36;CommandInsertSQL&lt;br /&gt;&lt;br /&gt;I&amp;#39;m then able to import the modules successfully.&lt;br /&gt;&lt;br /&gt;If you need any further information please don&amp;#39;t hesitate to ask.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;&lt;br /&gt;James&lt;br /&gt;</description><author>JimmyBoo</author><pubDate>Sat, 08 Sep 2012 07:08:58 GMT</pubDate><guid isPermaLink="false">Created Issue: Import-Module PerfCounters failes in Windows 8 with SQL Server 2012 [1] 20120908070858A</guid></item><item><title>Created Issue: Set-SqlObjectPermission problem [22978]</title><link>http://sqlpsx.codeplex.com/workitem/22978</link><description>BTW&amp;#33;&amp;#33;&amp;#33;&amp;#33;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&amp;#40;&amp;#36;_.Parent.Roles &amp;#124; where &amp;#123;&amp;#36;_.name -eq &amp;#36;name&amp;#125;&amp;#41;&amp;#41; &lt;br /&gt;&lt;br /&gt;SHOULD BE&lt;br /&gt;&lt;br /&gt;&amp;#40;&amp;#36;smo.Parent.Roles &amp;#124; where &amp;#123;&amp;#36;_.name -eq &amp;#36;name&amp;#125;&amp;#41;&amp;#41;&lt;br /&gt;</description><author>cmille19</author><pubDate>Mon, 02 Jul 2012 21:10:11 GMT</pubDate><guid isPermaLink="false">Created Issue: Set-SqlObjectPermission problem [22978] 20120702091011P</guid></item><item><title>Created Issue: Set-SqlObjectPermission problem [22977]</title><link>http://sqlpsx.codeplex.com/workitem/22977</link><description>in the sqlserver module&lt;br /&gt;&lt;br /&gt;definition of function Set-SqlObjectPermission&lt;br /&gt;&lt;br /&gt;with on line&lt;br /&gt;&lt;br /&gt;&amp;#34;Write-Verbose &amp;#34;Set-SqlObjectPermission &amp;#36;&amp;#40;&amp;#36;smo.Name&amp;#41; &amp;#36;permission &amp;#36;name &amp;#36;action&amp;#34;&amp;#34;&lt;br /&gt;&lt;br /&gt;when i mark it as a comment, starting with &amp;#35;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;this function would be fine...&lt;br /&gt;</description><author>cmille19</author><pubDate>Mon, 02 Jul 2012 21:09:54 GMT</pubDate><guid isPermaLink="false">Created Issue: Set-SqlObjectPermission problem [22977] 20120702090954P</guid></item><item><title>Created Issue: Errors importing SQLMaint and SQLServer [21876]</title><link>http://sqlpsx.codeplex.com/workitem/21876</link><description>SQLServer module shows up in get-module as loaded, though &amp;#40;SQLMaint does not&amp;#41;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Users&amp;#92;Mike &amp;#35;&amp;#91;SQL&amp;#93;--- &amp;#35;&amp;#91;Oracle&amp;#93;--- &amp;#62; import-module sqlmaint&lt;br /&gt;Import-Module &amp;#58; Object reference not set to an instance of an object.&lt;br /&gt;At line&amp;#58;1 char&amp;#58;1&lt;br /&gt;&amp;#43; import-module sqlmaint&lt;br /&gt;&amp;#43; &amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&amp;#126;&lt;br /&gt;    &amp;#43; CategoryInfo          &amp;#58; NotSpecified&amp;#58; &amp;#40;&amp;#58;&amp;#41; &amp;#91;Import-Module&amp;#93;, NullReferenceException&lt;br /&gt;    &amp;#43; FullyQualifiedErrorId &amp;#58; System.NullReferenceException,Microsoft.PowerShell.Commands.ImportModuleCommand&lt;br /&gt;</description><author>MikeShepard</author><pubDate>Tue, 06 Dec 2011 03:47:11 GMT</pubDate><guid isPermaLink="false">Created Issue: Errors importing SQLMaint and SQLServer [21876] 20111206034711A</guid></item><item><title>Created Issue: Missing SQLEnum Add-Type [21303]</title><link>http://sqlpsx.codeplex.com/workitem/21303</link><description>Need to add this to sqlserver.psm1&amp;#58;&lt;br /&gt;&lt;br /&gt;add-type -AssemblyName &amp;#34;Microsoft.SqlServer.SqlEnum, Version&amp;#61;10.0.0.0, Culture&amp;#61;neutral, PublicKeyToken&amp;#61;89845dcd8080cc91&amp;#34;&lt;br /&gt;</description><author>cmille19</author><pubDate>Fri, 05 Aug 2011 15:35:48 GMT</pubDate><guid isPermaLink="false">Created Issue: Missing SQLEnum Add-Type [21303] 20110805033548P</guid></item><item><title>Commented Issue: Invoke-Sql closes connection before executing query [21191]</title><link>http://sqlpsx.codeplex.com/workitem/21191</link><description>When using the Invoke-Sql function in an adhoc manner &amp;#40;i.e. specifying -Server but not providing a connection via the -Connection parameter&amp;#41;, the function closes the connection before firing the .ExecuteNonQuery command&amp;#58;&lt;br /&gt;&lt;br /&gt;       &amp;#36;cmd&amp;#61;new-sqlcommand &amp;#64;PSBoundParameters&lt;br /&gt;&lt;br /&gt;       &amp;#35;if it was an ad hoc connection, close it&lt;br /&gt;       if &amp;#40;&amp;#36;server&amp;#41;&amp;#123;&lt;br /&gt;          &amp;#36;cmd.connection.close&amp;#40;&amp;#41;&lt;br /&gt;       &amp;#125;&amp;#9;&lt;br /&gt;&lt;br /&gt;       return &amp;#36;cmd.ExecuteNonQuery&amp;#40;&amp;#41;&lt;br /&gt;&lt;br /&gt;This causes the function to fail with the following error&amp;#58;&lt;br /&gt;&lt;br /&gt;Exception calling &amp;#34;ExecuteNonQuery&amp;#34; with &amp;#34;0&amp;#34; argument&amp;#40;s&amp;#41;&amp;#58; &amp;#34;ExecuteNonQuery requires an open and available Connection. The connection&amp;#39;s current state is closed.&amp;#34;&lt;br /&gt;Comments: ** Comment from web user: MikeShepard ** &lt;p&gt;Sorry about that.  This was fixed in &amp;#34;Change Set 59024&amp;#34;.  We&amp;#39;re working on a release &amp;#40;which includes a major reworking of the adolib module&amp;#41;.&lt;/p&gt;&lt;p&gt;For what it&amp;#39;s worth, if you look at the changeset I mentioned it matches your fix almost exactly &amp;#40;I didn&amp;#39;t include the comments with your initials &amp;#58;-&amp;#41;&amp;#41;&lt;/p&gt;&lt;p&gt;Thanks for taking the time to post this, though.  We appreciate people using the code and looking at how it works.&lt;/p&gt;&lt;p&gt;Mike&lt;/p&gt;</description><author>MikeShepard</author><pubDate>Mon, 01 Aug 2011 02:21:07 GMT</pubDate><guid isPermaLink="false">Commented Issue: Invoke-Sql closes connection before executing query [21191] 20110801022107A</guid></item><item><title>Commented Issue: Invoke-Sql closes connection before executing query [21191]</title><link>http://sqlpsx.codeplex.com/workitem/21191</link><description>When using the Invoke-Sql function in an adhoc manner &amp;#40;i.e. specifying -Server but not providing a connection via the -Connection parameter&amp;#41;, the function closes the connection before firing the .ExecuteNonQuery command&amp;#58;&lt;br /&gt;&lt;br /&gt;       &amp;#36;cmd&amp;#61;new-sqlcommand &amp;#64;PSBoundParameters&lt;br /&gt;&lt;br /&gt;       &amp;#35;if it was an ad hoc connection, close it&lt;br /&gt;       if &amp;#40;&amp;#36;server&amp;#41;&amp;#123;&lt;br /&gt;          &amp;#36;cmd.connection.close&amp;#40;&amp;#41;&lt;br /&gt;       &amp;#125;&amp;#9;&lt;br /&gt;&lt;br /&gt;       return &amp;#36;cmd.ExecuteNonQuery&amp;#40;&amp;#41;&lt;br /&gt;&lt;br /&gt;This causes the function to fail with the following error&amp;#58;&lt;br /&gt;&lt;br /&gt;Exception calling &amp;#34;ExecuteNonQuery&amp;#34; with &amp;#34;0&amp;#34; argument&amp;#40;s&amp;#41;&amp;#58; &amp;#34;ExecuteNonQuery requires an open and available Connection. The connection&amp;#39;s current state is closed.&amp;#34;&lt;br /&gt;Comments: ** Comment from web user: yardbirdsax ** &lt;p&gt;Here&amp;#39;s a fix for the bug that I tested and it appears to resolve the issue.&lt;/p&gt;&lt;p&gt;Thanks,&lt;br /&gt;Josh&lt;/p&gt;</description><author>yardbirdsax</author><pubDate>Mon, 18 Jul 2011 19:41:29 GMT</pubDate><guid isPermaLink="false">Commented Issue: Invoke-Sql closes connection before executing query [21191] 20110718074129P</guid></item><item><title>Created Issue: Invoke-Sql closes connection before executing query [21191]</title><link>http://sqlpsx.codeplex.com/workitem/21191</link><description>When using the Invoke-Sql function in an adhoc manner &amp;#40;i.e. specifying -Server but not providing a connection via the -Connection parameter&amp;#41;, the function closes the connection before firing the .ExecuteNonQuery command&amp;#58;&lt;br /&gt;&lt;br /&gt;       &amp;#36;cmd&amp;#61;new-sqlcommand &amp;#64;PSBoundParameters&lt;br /&gt;&lt;br /&gt;       &amp;#35;if it was an ad hoc connection, close it&lt;br /&gt;       if &amp;#40;&amp;#36;server&amp;#41;&amp;#123;&lt;br /&gt;          &amp;#36;cmd.connection.close&amp;#40;&amp;#41;&lt;br /&gt;       &amp;#125;&amp;#9;&lt;br /&gt;&lt;br /&gt;       return &amp;#36;cmd.ExecuteNonQuery&amp;#40;&amp;#41;&lt;br /&gt;&lt;br /&gt;This causes the function to fail with the following error&amp;#58;&lt;br /&gt;&lt;br /&gt;Exception calling &amp;#34;ExecuteNonQuery&amp;#34; with &amp;#34;0&amp;#34; argument&amp;#40;s&amp;#41;&amp;#58; &amp;#34;ExecuteNonQuery requires an open and available Connection. The connection&amp;#39;s current state is closed.&amp;#34;&lt;br /&gt;</description><author>yardbirdsax</author><pubDate>Mon, 18 Jul 2011 19:14:05 GMT</pubDate><guid isPermaLink="false">Created Issue: Invoke-Sql closes connection before executing query [21191] 20110718071405P</guid></item><item><title>Commented Issue: Set-SQLObjectPermission issue [20751]</title><link>http://sqlpsx.codeplex.com/workitem/20751</link><description>I was trying to use Set-SQLObjectPermission from SQLPSX v2.3.2.1 to grant Select on a view to a user, and I got a really weird result.  &lt;br /&gt;&lt;br /&gt;Command Line&amp;#58;&lt;br /&gt;&amp;#36;view &amp;#61; Get-SQLView  -database &amp;#40;get-sqldatabase &amp;#34;dbserver01,1433&amp;#34; db_name&amp;#41; view_myview&lt;br /&gt;set-sqlobjectpermission -smo &amp;#36;view -permission select -name  db_name_view_user -action grant -verbose&lt;br /&gt;&lt;br /&gt;Result&amp;#58;&lt;br /&gt;VERBOSE&amp;#58; Set-SqlObjectPermission view_myview select db_name_view_user grant&lt;br /&gt;&lt;br /&gt;Handles  NPM&amp;#40;K&amp;#41;    PM&amp;#40;K&amp;#41;      WS&amp;#40;K&amp;#41; VM&amp;#40;M&amp;#41;   CPU&amp;#40;s&amp;#41;     Id ProcessName&lt;br /&gt;-------  ------    -----      ----- -----   ------     -- -----------&lt;br /&gt;     37       4      976        824    14            1476 AEADISRV&lt;br /&gt;    396      57    84560      49780   815   104.18   1688 Agent&lt;br /&gt;    215      46    18336      19400   207            1500 AgentService&lt;br /&gt;    113      14     1664       1620    40            1524 AppleMobileDeviceS...&lt;br /&gt;     67       8     1460       1760    76     0.09   2452 atchk&lt;br /&gt;     67       8     1436       1540    35            1548 atchksrv&lt;br /&gt;    166      10    16416      11088    53            7148 audiodg&lt;br /&gt;   1268      44    20264      18216   143            2728 CcmExec&lt;br /&gt;     95       9     1280       1388    38            5420 Com4QLBEx&lt;br /&gt;   1447     107    82704      74668   460   651.18   3456 communicator&lt;br /&gt;    939      47    39288      25864   386   271.75   9408 communicatork9&lt;br /&gt;     31       4      872        384    22            1232 conhost&lt;br /&gt;     31       4      868        384    22            2932 conhost&lt;br /&gt;     64       8     2476       2568    67     7.69   6076 conhost&lt;br /&gt;     60       7     2076       4956    57     8.86   7636 conhost&lt;br /&gt;     62       7     2436       1844    58     1.22   7960 conhost&lt;br /&gt;. . . &amp;#60;SNIP&amp;#62; . . .&lt;br /&gt;    137      11     3476      19300    67             864 winlogon&lt;br /&gt;    350      23     5892       4664    84            1224 wlanext&lt;br /&gt;    293      18    10296       6484    90            3948 WmiPrvSE&lt;br /&gt;    122      12     5472       3656    41            4264 WmiPrvSE&lt;br /&gt;    141      13    10504      10296    61            4336 WmiPrvSE&lt;br /&gt;    161      11     3996       8024    38            9120 WmiPrvSE&lt;br /&gt;    112      10     2408       5908    33            9824 WmiPrvSE&lt;br /&gt;&lt;br /&gt;        if&amp;#40;&amp;#40;&amp;#36;smo.Parent.Users &amp;#124; where &amp;#123;&amp;#36;_.name -eq &amp;#36;name&amp;#125;&amp;#41; -or &amp;#40;&amp;#36;_.Parent.Roles&lt;br /&gt; &amp;#124; where &amp;#123;&amp;#36;_.name -eq &amp;#36;name&amp;#125;&amp;#41;&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            &amp;#36;perm &amp;#61; new-object &amp;#40;&amp;#39;Microsoft.SqlServer.Management.Smo.ObjectPermi&lt;br /&gt;ssionSet&amp;#39;&amp;#41;&lt;br /&gt;            &amp;#36;perm.&amp;#36;&amp;#40;&amp;#36;permission.ToString&amp;#40;&amp;#41;&amp;#41; &amp;#61; &amp;#36;true&lt;br /&gt;&lt;br /&gt;            switch &amp;#40;&amp;#36;action&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                &amp;#39;Grant&amp;#39;  &amp;#123; &amp;#36;smo.Grant&amp;#40;&amp;#36;perm,&amp;#36;name&amp;#41; &amp;#125;&lt;br /&gt;                &amp;#39;Deny&amp;#39;   &amp;#123; &amp;#36;smo.Deny&amp;#40;&amp;#36;perm,&amp;#36;name&amp;#41; &amp;#125;&lt;br /&gt;                &amp;#39;Revoke&amp;#39; &amp;#123; &amp;#36;smo.Revoke&amp;#40;&amp;#36;perm,&amp;#36;name&amp;#41; &amp;#125;&lt;br /&gt;                default  &amp;#123; throw &amp;#39;Set-SqlObjectPermission&amp;#58;Param &amp;#96;&amp;#36;action must b&lt;br /&gt;e Grant, Deny or Revoke.&amp;#39; &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;        else&lt;br /&gt;        &amp;#123; throw &amp;#34;Role or User &amp;#36;name does not exist in database &amp;#36;&amp;#40;&amp;#36;database.Name&lt;br /&gt;&amp;#41;.&amp;#34; &amp;#125;&lt;br /&gt;&lt;br /&gt;The result set includes the output of Get-Process roughly where the PROCESS keyword appears in the Get-SQLObjectPermissions function, followed by the remainder of the definition of the function.  I&amp;#39;ve never seen a function do this, but I can consistently reproduce it with this function.  I have tried this from two different Powershell shells with two different usernames &amp;#40;both with sysadmin permissions&amp;#41; and get the same result.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m not convinced that this is a bug, but I&amp;#39;m not convinced it&amp;#39;s not, either.   Any thoughts are appreciated.&lt;br /&gt;&lt;br /&gt;Jamie&lt;br /&gt;Comments: ** Comment from web user: MikeShepard ** &lt;p&gt;Looked again at the pipeline usage, and determined that the write-verbose belongs inside the process block.  I have updated the module.&lt;/p&gt;</description><author>MikeShepard</author><pubDate>Fri, 08 Jul 2011 03:09:19 GMT</pubDate><guid isPermaLink="false">Commented Issue: Set-SQLObjectPermission issue [20751] 20110708030919A</guid></item><item><title>Commented Issue: Set-SQLObjectPermission issue [20751]</title><link>http://sqlpsx.codeplex.com/workitem/20751</link><description>I was trying to use Set-SQLObjectPermission from SQLPSX v2.3.2.1 to grant Select on a view to a user, and I got a really weird result.  &lt;br /&gt;&lt;br /&gt;Command Line&amp;#58;&lt;br /&gt;&amp;#36;view &amp;#61; Get-SQLView  -database &amp;#40;get-sqldatabase &amp;#34;dbserver01,1433&amp;#34; db_name&amp;#41; view_myview&lt;br /&gt;set-sqlobjectpermission -smo &amp;#36;view -permission select -name  db_name_view_user -action grant -verbose&lt;br /&gt;&lt;br /&gt;Result&amp;#58;&lt;br /&gt;VERBOSE&amp;#58; Set-SqlObjectPermission view_myview select db_name_view_user grant&lt;br /&gt;&lt;br /&gt;Handles  NPM&amp;#40;K&amp;#41;    PM&amp;#40;K&amp;#41;      WS&amp;#40;K&amp;#41; VM&amp;#40;M&amp;#41;   CPU&amp;#40;s&amp;#41;     Id ProcessName&lt;br /&gt;-------  ------    -----      ----- -----   ------     -- -----------&lt;br /&gt;     37       4      976        824    14            1476 AEADISRV&lt;br /&gt;    396      57    84560      49780   815   104.18   1688 Agent&lt;br /&gt;    215      46    18336      19400   207            1500 AgentService&lt;br /&gt;    113      14     1664       1620    40            1524 AppleMobileDeviceS...&lt;br /&gt;     67       8     1460       1760    76     0.09   2452 atchk&lt;br /&gt;     67       8     1436       1540    35            1548 atchksrv&lt;br /&gt;    166      10    16416      11088    53            7148 audiodg&lt;br /&gt;   1268      44    20264      18216   143            2728 CcmExec&lt;br /&gt;     95       9     1280       1388    38            5420 Com4QLBEx&lt;br /&gt;   1447     107    82704      74668   460   651.18   3456 communicator&lt;br /&gt;    939      47    39288      25864   386   271.75   9408 communicatork9&lt;br /&gt;     31       4      872        384    22            1232 conhost&lt;br /&gt;     31       4      868        384    22            2932 conhost&lt;br /&gt;     64       8     2476       2568    67     7.69   6076 conhost&lt;br /&gt;     60       7     2076       4956    57     8.86   7636 conhost&lt;br /&gt;     62       7     2436       1844    58     1.22   7960 conhost&lt;br /&gt;. . . &amp;#60;SNIP&amp;#62; . . .&lt;br /&gt;    137      11     3476      19300    67             864 winlogon&lt;br /&gt;    350      23     5892       4664    84            1224 wlanext&lt;br /&gt;    293      18    10296       6484    90            3948 WmiPrvSE&lt;br /&gt;    122      12     5472       3656    41            4264 WmiPrvSE&lt;br /&gt;    141      13    10504      10296    61            4336 WmiPrvSE&lt;br /&gt;    161      11     3996       8024    38            9120 WmiPrvSE&lt;br /&gt;    112      10     2408       5908    33            9824 WmiPrvSE&lt;br /&gt;&lt;br /&gt;        if&amp;#40;&amp;#40;&amp;#36;smo.Parent.Users &amp;#124; where &amp;#123;&amp;#36;_.name -eq &amp;#36;name&amp;#125;&amp;#41; -or &amp;#40;&amp;#36;_.Parent.Roles&lt;br /&gt; &amp;#124; where &amp;#123;&amp;#36;_.name -eq &amp;#36;name&amp;#125;&amp;#41;&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            &amp;#36;perm &amp;#61; new-object &amp;#40;&amp;#39;Microsoft.SqlServer.Management.Smo.ObjectPermi&lt;br /&gt;ssionSet&amp;#39;&amp;#41;&lt;br /&gt;            &amp;#36;perm.&amp;#36;&amp;#40;&amp;#36;permission.ToString&amp;#40;&amp;#41;&amp;#41; &amp;#61; &amp;#36;true&lt;br /&gt;&lt;br /&gt;            switch &amp;#40;&amp;#36;action&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                &amp;#39;Grant&amp;#39;  &amp;#123; &amp;#36;smo.Grant&amp;#40;&amp;#36;perm,&amp;#36;name&amp;#41; &amp;#125;&lt;br /&gt;                &amp;#39;Deny&amp;#39;   &amp;#123; &amp;#36;smo.Deny&amp;#40;&amp;#36;perm,&amp;#36;name&amp;#41; &amp;#125;&lt;br /&gt;                &amp;#39;Revoke&amp;#39; &amp;#123; &amp;#36;smo.Revoke&amp;#40;&amp;#36;perm,&amp;#36;name&amp;#41; &amp;#125;&lt;br /&gt;                default  &amp;#123; throw &amp;#39;Set-SqlObjectPermission&amp;#58;Param &amp;#96;&amp;#36;action must b&lt;br /&gt;e Grant, Deny or Revoke.&amp;#39; &amp;#125;&lt;br /&gt;            &amp;#125;&lt;br /&gt;        &amp;#125;&lt;br /&gt;        else&lt;br /&gt;        &amp;#123; throw &amp;#34;Role or User &amp;#36;name does not exist in database &amp;#36;&amp;#40;&amp;#36;database.Name&lt;br /&gt;&amp;#41;.&amp;#34; &amp;#125;&lt;br /&gt;&lt;br /&gt;The result set includes the output of Get-Process roughly where the PROCESS keyword appears in the Get-SQLObjectPermissions function, followed by the remainder of the definition of the function.  I&amp;#39;ve never seen a function do this, but I can consistently reproduce it with this function.  I have tried this from two different Powershell shells with two different usernames &amp;#40;both with sysadmin permissions&amp;#41; and get the same result.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m not convinced that this is a bug, but I&amp;#39;m not convinced it&amp;#39;s not, either.   Any thoughts are appreciated.&lt;br /&gt;&lt;br /&gt;Jamie&lt;br /&gt;Comments: ** Comment from web user: MikeShepard ** &lt;p&gt;I hadn&amp;#39;t seen this before.  You&amp;#39;re right.  The write-verbose definitely belongs inside a begin block for it to make any sense.&lt;/p&gt;</description><author>MikeShepard</author><pubDate>Fri, 08 Jul 2011 02:51:25 GMT</pubDate><guid isPermaLink="false">Commented Issue: Set-SQLObjectPermission issue [20751] 20110708025125A</guid></item></channel></rss>