<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.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>Gain Remote Access to the Get-ExCommand Exchange Command</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/24/gain-remote-access-to-the-get-excommand-exchange-server-command.aspx</link><description>Learn how to gain access to the Get-ExCommand Exchange command while in an implicit remote Windows PowerShell session.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Gain Remote Access to the Get-ExCommand Exchange Command</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/24/gain-remote-access-to-the-get-excommand-exchange-server-command.aspx#3480982</link><pubDate>Wed, 15 Feb 2012 00:43:22 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3480982</guid><dc:creator>Doug</dc:creator><description>&lt;p&gt;Ben is correct. The function as written seems to work since if you&amp;#39;ve got a manual Exchange session most of the commands that are functions are Exchange commands.&lt;/p&gt;
&lt;p&gt;If you run get-excommand | ? {$_.Name -match &amp;quot;clear&amp;quot;} with a manual Exchange session, you&amp;#39;ll see Clear-Host as a result which is not an Exchange command. If you run it from a proper Exchange Management Shell, that won&amp;#39;t be there.&lt;/p&gt;
&lt;p&gt;Additionally, the actual Get-ExCommand returns too many results as well. If for instance, you import the Active Directory module from an Exchange Management Shell, Get-ExCommand will return those commands as too. Try get-excommand | ? {$_ -match &amp;quot;get-adc&amp;quot;} for instance.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3480982" width="1" height="1"&gt;</description></item><item><title>re: Gain Remote Access to the Get-ExCommand Exchange Command</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/24/gain-remote-access-to-the-get-excommand-exchange-server-command.aspx#3480630</link><pubDate>Mon, 13 Feb 2012 15:34:41 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3480630</guid><dc:creator>Ben</dc:creator><description>&lt;p&gt;This is helpless, the $global:importResults is set in the Exchange&amp;#39;s CommonConnectFunctions.ps1 script, which is obviously not needed to make a manual remoting to the Exchange&amp;#39;s Remote PowerShell. Hence, during a manual remoting this variable will not be defined, and will not be mapped to the Exchange&amp;#39;s imported module, and would be $null (or something else wrong which would break your pseudo-function).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3480630" width="1" height="1"&gt;</description></item></channel></rss>