2013-04-15 78 views
0

我正在乳寧的PowerShell的從我的PowerShell我想連接到我的Exchange PowerShell中
的diffrance速滑運動員的肌肉中的兩個文件是在其目標(右鍵單擊= proproties),如何從PowerShell連接到PowerShell的另一個環境

「正常」 的powershell目標= 的 「%SystemRoot%\ SYSTEM32 \ windowsPowerShell \ V1.0 \ powershell.exe」

「交換」 的powershell目標= 「C:\窗口\ system32 \ windowspowershell \ V1 .0 \ powershell.exe -PSConsoleFile「C:\ Program Files \ Microsoft \ Exchange Server \ bin \ exshell.psc1」-noexit -command「。 'C:\ Program Files \ Microsoft \ Exchange Server \ bin \ Exchange.ps1'「」

是否有一種方法可以通過代碼連接到Exchange Power Exchange?我的猜測是將這兩個額外的行添加到目標...

回答

2

該命令,如果安裝了Exchange管理工具行纔有效(它會嘗試加載Exchange管理管理單元。

一般情況下,更容易在腳本中使用隱式遠程處理並將遠程外殼的功能導入到當前會話中:

http://www.mikepfeiffer.net/2010/02/managing-exchange-2010-with-remote-powershell/

+0

謝謝,看起來非常好,但不幸的是我使用Exchange 2007. :( – woolford

+2

然後,我認爲你需要安裝管理工具並在會話中加載管理單元。 – mjolinor

+0

「管理工具」是什麼意思? – woolford