Loading ...
Sorry, an error occurred while loading the content.
 

Re: Creating a mailbox

Expand Messages
  • yantran52
    Let me pick this thread back up since I am getting closer to having to make the coding change to Exchange 2007. For now we are running a mix of Exchange 2003
    Message 1 of 9 , Nov 19, 2008
      Let me pick this thread back up since I am getting closer to having
      to make the coding change to Exchange 2007. For now we are running a
      mix of Exchange 2003 and 2007 servers. I am a programmer, not an
      Exchange administrator.

      We have a web page that allows new students to the university to
      create their account and mailbox. Does the PowerShell cmdlet to
      create the mailbox need to run on the Exchange server itself or can
      it run from the web server where the ASP.Net runs?

      Thanks for any help.

      richard

      --- In ADSIANDDirectoryServices@yahoogroups.com, "Michael B. Smith"
      <michael@...> wrote:
      >
      > Yes, that's one way to do it and it's a lot more powerful than
      CDOEXM. With
      > that comes more complexity.
      >
      >
      >
      > An easier way, if you don't need all the control, is just to shell
      out and
      > call PowerShell. That is:
      >
      >
      >
      > %comspec% powershell.exe "&{new-exchangemailbox ..}"
      >
      >
      >
      > Etc.etc.
      >
      >
      >
      > Regards,
      >
      >
      >
      > Michael B. Smith
      >
      > MCITP:SA,EMA/MCSE/Exchange MVP
      >
      > http://TheEssentialExchange.com
      >
      >
      >
      > From: ADSIANDDirectoryServices@yahoogroups.com
      > [mailto:ADSIANDDirectoryServices@yahoogroups.com] On Behalf Of
      Yantis,
      > Richard
      > Sent: Wednesday, September 10, 2008 7:06 AM
      > To: ADSIANDDirectoryServices@yahoogroups.com
      > Subject: RE: [ADSI-DirSrv] Creating a mailbox
      >
      >
      >
      > Is the below good info on how to do that? Seems quite a bit more
      > involved than what I have now. I am creating the accounts and
      mailboxes
      > from asp.Net.
      >
      > < You can call the powershell cmdlets directly (and in-process) from
      > your
      > < application. If you wan't to do this in a web-page, you'll have to
      > separate
      > < the call to the cmdlet from the website (UI) and put it in a COM+
      > application.
      > <
      > < See http://msdn2.microsoft.com/en-us/library/bb332449.aspx.
      >
      > -----Original Message-----
      > From: ADSIANDDirectoryServices@yahoogroups.com
      > <mailto:ADSIANDDirectoryServices%40yahoogroups.com>
      > [mailto:ADSIANDDirectoryServices@yahoogroups.com
      > <mailto:ADSIANDDirectoryServices%40yahoogroups.com> ] On Behalf Of
      Michael
      > B. Smith
      > Sent: Wednesday, September 10, 2008 3:45 AM
      > To: ADSIANDDirectoryServices@yahoogroups.com
      > <mailto:ADSIANDDirectoryServices%40yahoogroups.com>
      > Subject: RE: [ADSI-DirSrv] Creating a mailbox
      >
      > Not if you don't have an Exchange 2000/2003 server.
      >
      > You'll have to move to PowerShell.
      >
      > Regards,
      >
      > Michael B. Smith
      > MCITP:SA,EMA/MCSE/Exchange MVP
      > http://TheEssentialExchange.com
      >
      >
      > From: ADSIANDDirectoryServices@yahoogroups.com
      > <mailto:ADSIANDDirectoryServices%40yahoogroups.com>
      > [mailto:ADSIANDDirectoryServices@yahoogroups.com
      > <mailto:ADSIANDDirectoryServices%40yahoogroups.com> ] On Behalf Of
      Yantis,
      > Richard
      > Sent: Tuesday, September 09, 2008 11:13 PM
      > To: ADSIANDDirectoryServices@yahoogroups.com
      > <mailto:ADSIANDDirectoryServices%40yahoogroups.com>
      > Subject: [ADSI-DirSrv] Creating a mailbox
      >
      > We have been using the code below for a few years to create all of
      the
      > mailboxes for our university. We are moving from Exchange 2003 to
      > Exchange 2007 and have already move AD to 2008. Is my CDOEXM still
      > going to work?
      >
      > Dim IMailbox As CDOEXM.IMailboxStore =
      > CType(adsUser.NativeObject, CDOEXM.IMailboxStore)
      > MDBURL = "LDAP://" & adsHost & "/" &
      > mdbData.GetMDBURL(mdbStoreData) & "," & adsRoot
      > IMailbox.CreateMailbox(MDBURL)
      > PutProp("mailNickname", adsUser.Username) 'use
      > samAccountName as mailNickname
      > PutProp("proxyAddresses", "SMTP:" & eMailAddress & "@" &
      > adsDomain)
      > PutProp("mDBUseDefaults", True) 'We want this value to
      > always be true for new MBs.
      > ' enable immediate-logon for the user
      > PutProp("msExchUserAccountControl", 0) 'just added this on
      > 7/5/2005.
      > adsUser.CommitChanges()
      >
      > Richard
      >
      > [Non-text portions of this message have been removed]
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.