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