Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在Exchange 2010 c中创建邮箱_C#_Powershell Remoting - Fatal编程技术网

C# 在Exchange 2010 c中创建邮箱

C# 在Exchange 2010 c中创建邮箱,c#,powershell-remoting,C#,Powershell Remoting,首先,我为我的英语不好道歉 我想在Exchange 2010中创建邮箱用户。正如我一直说的,搜索可以通过PowerShell完成。PowerShell远程处理还有其他方法吗?我想我理解你的要求,如果我错了,请纠正我 是否要远程连接到exchange服务器,然后创建邮箱 使用以下方法连接到exchange,非常简单,但您可以使用它做更多的事情 function Connect-MSExchSession { [CmdletBinding()] param ( [Pa

首先,我为我的英语不好道歉


我想在Exchange 2010中创建邮箱用户。正如我一直说的,搜索可以通过PowerShell完成。PowerShell远程处理还有其他方法吗?

我想我理解你的要求,如果我错了,请纠正我

是否要远程连接到exchange服务器,然后创建邮箱

使用以下方法连接到exchange,非常简单,但您可以使用它做更多的事情

function Connect-MSExchSession
{
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true, Position = 0)]
        [string]$Server
    )

    $URI = 'http://' + $Server + '/powershell'
    $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $URI
    Import-Module (Import-PSSession $session -AllowClobber) -Global
}
连接后,只需发出cmdlet New Mailbox和require属性,如果它是现有用户的新邮箱,则它将是Enable Mailbox