Invoke-Command fails to execute Exchange cmdlets
i have developed powershell script captures exchange , os related information. script works fine when run server.
when try execute script remotely windows part executes , os information returned, exchange part, cmdlets fail execute , unable retrieve information.
is limitation of powershell remoting, normal windows cmdlets executing, exchange cmdlets fail ?
thank you!
raj17
exchange cmdlets requirs exchange configuration run.
you need create implicid remote session exchange or need add pssnapin before running exchange cmdlets .
to create implicid remote pssession :
$s=new-pssession -configurationname microsoft.exchange -connectionuri http://fqdnofexchangeserver/powershell
import-pssession $s
or
to add add-pssnapin load de exchange management shell current powershell
add-pssnapin microsoft.exchange.management.powershell.admin
mcitp - exchange 2010 | mcitp - windows server 2008 r2
Windows Server > Windows PowerShell
Comments
Post a Comment