Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку

Ответить
Аватара пользователя
VIPer7

Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку

Сообщение VIPer7 »

Прошу совета

Как добавить почтовый ящик с exchange в outlook 2010 через командную строку

например [url=mailto:user1@mycompany.com]user1@mycompany.com[/url] уже есть и надо добавить ещё один [url=mailto:user2@mycompany.com]user2@mycompany.com[/url]

Именно почтовый ящик (account) а не profile



нужно добавить один почтовый ящик нескольким юзерам домена

туда будут приходить факсы и он будет доступен только этим юзерам

В ручную сделать это трудновато (юзеров 10-20) хотелось бы автоматизировать этот процесс через логинскрипт

много гуглил но нашел только
http://www.itefix.no/i2/texprof


не совсем подходит...



Texprof is a small command-line utility that allows you to create Outlook profiles for Exchange. It may be useful during Exchange migrations or profile maintenance via login scripts. It supports all windows platforms (95 to 2003). It accepts three arguments :



profile name

exchange server name

mailbox name

Example :



texprof MyProfile EXCHSERV userid
Аватара пользователя
VIPer7

Re: Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку

Сообщение VIPer7 »

zero55,

Может быть в более старых версиях(outlook,exchange) и нельзя было

у меня outlook 2010 можно добавить хоть 10

вопрос в том как это сделать через login script
Аватара пользователя
zero55

Re: Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку

Сообщение zero55 »

Цитата Oleg Krylov:



В 2010 у меня три
Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку




Подцепленных вторым ящиком?

Этих можно напихать сколько угодно...



Скриптом их все равно не добавить.
Аватара пользователя
VIPer7

Re: Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку

Сообщение VIPer7 »

Цитата zero55:



Скриптом их все равно не добавить.
Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку




Профиль добавить скриптом проблем нет

Неужели аккаунт нельзя?
Аватара пользователя
Oleg Krylov

Re: Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку

Сообщение Oleg Krylov »

Цитата zero55:



Подцепленных вторым ящиком?
Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку




Почитайте про Multiple Exchange Account in Outlook 2010.

VIPer7, попробуйте вот так:
http://technet.microsoft.com/en-us/l.../ee815819.aspx


Но придется запускать установку, если я правильно понял. Установку можно запустить logon-скриптом.

На шаге 8 снимите галку Overwrite Existing Exchange Account.
Аватара пользователя
zero55

Re: Клиенты - Как добавить почтовый ящик с exchange в outlook 2010 через командную строку

Сообщение zero55 »

оказывается можно.

нашел у себя в архиве вот такой скриптик.

Скажу сразу не проболвал...



Код:

Код: Выделить всё

Const PR_STORE_PROVIDERS = &H3D000102 
Const PR_PROVIDER_UID = &H300C0102 
Const PR_DISPLAY_NAME = &H3001001E 
Const PR_PROFILE_MAILBOX = &H660B001E 
Const PR_PROFILE_SERVER = &H660C001E 
Const PR_PROFILE_SERVER_DN = &H6614001E 
Const PR_EMAIL_ADDRESS = &H3003001E 
Dim sTitle,sMessage, iKount 
sMailBoxName = InputBox("Enter the name of the mailbox to add","Add 
Additional Mailbox") 
' look up in ad to see if it exists 
Set Conn = CreateObject("ADODB.Connection") 
Conn.Open "Provider=ADsDSOObject;" 
Set Cmd = CreateObject("ADODB.Command") 
Cmd.ActiveConnection = Conn 
Cmd.CommandText = ";(&(objectCategory=person) 
(|(displayName=*" & sMailBoxName & "*) (sAMAccountName=*" &sMailBoxName & 
"*)));displayName,sAMAccountName;subtree" 
Set Rst = Cmd.Execute 
If Rst.RecordCount = 1 Then 
   ' found exact match 
   ' assume mailbox id is the sAMAccountName 
   sMailBoxID = Rst.Fields("sAMAccountName") 
   sMailSvr = "MAILSERVER1" ' the mail server the mailbox is on 
   sMailBoxDN = "/o=example/ou=staff/cn=Recipients/cn=" & sMailBoxID 
   sServerDN = "/O=example/OU=staff/cn=Configuration/cn=Servers/cn=" & 
sMailSvr 
   AddMailBox "",sMailBoxName,sMailBoxDN,sMailSvr,sServerDN 
   MsgBox "The mailbox for " & Rst.Fields("displayName") & "has been added. 
Please check that it has been added to your profile " & _ 
          "correctly. If there is still a problem please report it to the 
Service Desk ",0,"Finished" 
Else 
   If Rst.RecordCount = 0 Then 
      ' not found 
      sTitle = "Mailbox not found" 
      sMessage = "Unable to add mailbox for " & sMailBoxName & ". The 
mailbox cannot be found." 
   Else 
      ' multiple entries found 
      sTitle = Rst.RecordCount & " mailbox" 
      If Rst.RecordCount > 1 Then 
         sTitle = sTitle & "es" 
      End If 
      sTitle = sTitle & " found" 
      sMessage = "Unable to add mailbox for " & sMailBoxName & ". There are 
multiple mailboxes that meet the " & _ 
                 "specified criteria " 
      If Rst.RecordCount < 30 Then 
         sMessage = "Unable to add mailbox for " & sMailBoxName & ". There 
are multiple mailboxes that meet the " & _ 
                 "specified criteria as listed below:" & vbCrLf & vbCrLf 
         For iKount = 1 To Rst.RecordCount 
            If iKount < 10 Then 
               sMessage = sMessage & "     " 
            Else 
               sMessage = sMessage & "   " 
            End If 
            sMessage = sMessage & CStr(iKount) & ". " & 
Rst.Fields("displayName") & " - " & Rst.Fields("sAMAccountName") & vbCrLf 
            Rst.MoveNext 
         Next 
      Else 
         sMessage = "Unable to add mailbox for " & sMailBoxName & ". There 
are too many mailboxes that " & _ 
                    "matched the criteria to list." & vbCrLf 
      End If 
      sMessage = sMessage & vbCrLf & "Please re-run this program and enter a 
more specific mailbox name." 
   End If 
   MsgBox sMessage, 0, sTitle 
End If 
' clean up 
Rst.Close 
Set Rst = Nothing 
Set Cmd = Nothing 
Conn.Close 
Set Conn = Nothing 
Sub AddMailBox(strProfile, strDisplayName, strMailboxDN, strServer, 
strServerDN) 
  Set Profiles=CreateObject("ProfMan.Profiles") 
  If strProfile = "" Then 
    Set Profile = Profiles.DefaultProfile 
  Else 
    Set Profile = Profiles.Item(strProfile) 
   End If 
  'find the Exchange service 
  Set Services = Profile.Services 
  For i = 1 To Services.Count 
    Set Service = Services.Item(i) 
    If Service.ServiceName = "MSEMS" Then 
      'Add "EMSDelegate" provider 
      Set Properties = CreateObject("ProfMan.PropertyBag") 
      Properties.Add PR_DISPLAY_NAME, strDisplayName 
      Properties.Add PR_PROFILE_MAILBOX, strMailboxDN 
      Properties.Add PR_PROFILE_SERVER, strServer 
      Properties.Add PR_PROFILE_SERVER_DN, strServerDN 
      Set Provider = Service.Providers.Add("EMSDelegate", Properties) 
      'update the old value of PR_STORE_PROVIDERS so that Outlook 
      'will show the mailbox in the list in Tools | Services 
      Set GlobalProfSect = Profile.GlobalProfSect 
      OldProviders = GlobalProfSect.Item(PR_STORE_PROVIDERS) 
      strUID = Provider.UID 
      GlobalProfSect.Item(PR_STORE_PROVIDERS) = OldProviders & strUID 
    End If 
  Next 
End Sub
Ответить

Вернуться в «Microsoft Exchange Server»