<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.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>More Advanced Functions - Get-Assembly and Get-ExportedType</title><link>http://blogs.msdn.com/b/powershell/archive/2008/12/23/more-advanced-functions-get-assembly-and-get-exportedtype.aspx</link><description>Tyson Kopczynski has just published a great article Fun with PowerShell 2.0 Eventing! That inspired to to write a script to automatically backup my modules directory. I'm doing a lot of scripting this week and I don't want to lose my work if I make a</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: More Advanced Functions - Get-Assembly and Get-ExportedType</title><link>http://blogs.msdn.com/b/powershell/archive/2008/12/23/more-advanced-functions-get-assembly-and-get-exportedtype.aspx#9337841</link><pubDate>Sun, 18 Jan 2009 15:53:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9337841</guid><dc:creator>Jacques</dc:creator><description>&lt;p&gt;Jeffrey,&lt;/p&gt;
&lt;p&gt;I have been playing with the get-exportedtype.ps1 script and when I run the provided examples I get several errors of the same type:&lt;/p&gt;
&lt;p&gt;Bad argument to operator '-like': Value cannot be null.&lt;/p&gt;
&lt;p&gt;Parameter name: input.&lt;/p&gt;
&lt;p&gt;At C:\Users\jbaratho\Documents\WindowsPowerShell\Scripts\Get-ExportedType.ps1:73 char:70&lt;/p&gt;
&lt;p&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $Types = $a.GetExportedTypes() | where {$_.BaseType -like &amp;lt;&amp;lt;&amp;lt;&amp;lt; &amp;nbsp;$BaseType -And $_.Name -like $Name} |sort&lt;/p&gt;
&lt;p&gt; Name&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;+ CategoryInfo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: InvalidOperation: (:) [], RuntimeException&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;+ FullyQualifiedErrorId : BadOperatorArgument&lt;/p&gt;
&lt;p&gt;I spent some time debugging the script and it looks like this is caused by types that contain '[' and ']' characters in their name.&lt;/p&gt;
&lt;p&gt;Am I the only one having this error? How can this be fixed?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Jacques&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9337841" width="1" height="1"&gt;</description></item><item><title>Dew Drop - December 23, 2008 | Alvin Ashcraft's Morning Dew</title><link>http://blogs.msdn.com/b/powershell/archive/2008/12/23/more-advanced-functions-get-assembly-and-get-exportedtype.aspx#9251055</link><pubDate>Wed, 24 Dec 2008 01:35:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9251055</guid><dc:creator>Dew Drop - December 23, 2008 | Alvin Ashcraft's Morning Dew</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.alvinashcraft.com/2008/12/23/dew-drop-december-23-2008/"&gt;http://www.alvinashcraft.com/2008/12/23/dew-drop-december-23-2008/&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9251055" width="1" height="1"&gt;</description></item></channel></rss>