Exchange Powershell - How to invoke Exchange 2010 module from inside script?

前端 未结 3 852
有刺的猬
有刺的猬 2021-01-02 05:36

I\'m writing a script that does a number of things with AD and Exchange and just got to the part of the GUI where I need to start working with Exchange but don\'t see where

3条回答
  •  天涯浪人
    2021-01-02 06:24

    import-module Microsoft.Exchange.Management.PowerShell.E2010aTry with some implementation like:

    $exchangeser = "MTLServer01"
    $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionURI http://${exchangeserver}/powershell/ -Authentication kerberos
    import-PSSession $session 
    

    or

    add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010
    

提交回复
热议问题