[英]Create a mailbox in Exchange 2010 c#
First of all I apologize for my bad english. 首先,我为我的英语不好而道歉。
I want to create mailbox users in Exchange 2010. As I always said search can be done with PowerShell. 我想在Exchange 2010中创建邮箱用户。正如我一直说的那样,可以使用PowerShell进行搜索。 Is there another way out of PowerShell Remoting? 有没有其他方法可以摆脱PowerShell Remoting?
I think I understand what your asking, do correct me if I'm wrong. 我想我理解您的要求,如果我错了,请纠正我。
You want to remote to an exchange server and then create a mailbox? 您要远程到交换服务器,然后创建邮箱?
Connect to exchange using the following, quite simple but you can do more with it. 使用以下非常简单的连接进行交流,但是您可以做更多的事情。
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
}
Once connected it should just be a case of issuing the cmdlet New-Mailbox
along with the require attributes, if its a new mailbox for an existing user then it would be Enable-Mailbox
连接后,仅是发布cmdlet New-Mailbox
以及require属性的情况,如果它是现有用户的新邮箱,则它将是Enable-Mailbox
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.