header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Preparing your system to manage Exchange with Powershell via ASP
Last Post 06 Dec 2010 04:20 AM by su27. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Karl MitschkeUser is Offline
Basic Member
Basic Member
Posts:451
Avatar

--
06 Dec 2007 08:07 AM
    This is how I do it for Exchange 2007:

    (Replace CAS Server(s) with OWA Server(s), and this should work fine for 2003 and 2000 also)

    1) Create a service account on your AD that has permissions in Exchange.
    2) Setup a new Application Pool in IIS on your CAS servers.
    3) Use the account created in #1 for the identity on the Application Pool.
    4) Put your website in the new pool
    5) Use NTFS permissions to provide access to the website.
    6) Use Windows authentication in your web.config

    Then, once someone is authenticated on the website, all Exchange processes are run as the service account created in step #1 - No impersonation needed.


    On your CAS server(s):

    Put the account you created in step 1 in the IIS_WPG local group on your CAS server(s)

    Then, you need to add the account to the CAS server(s) local policy "Act as part of the operating system" - follow the below steps:

    Open a command prompt
    Type secpol.msc and hit enter
    Wait a bit, for the "Local Security Settings" window to open
    In the left pane double click "Local Policies"
    Once again, In the left pane double click "User Rights Assignment"
    In the right pane, double click "Act as part of the operating system"

    Add the service account you created.

    Karl
    http://unlockpowershell.wordpress.com
    Co-Author, Windows PowerShell 2.0 Bible
    -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    Karl MitschkeUser is Offline
    Basic Member
    Basic Member
    Posts:451
    Avatar

    --
    15 May 2008 01:35 PM

    This is how I do it for Exchange 2007 on Server 2008:
    1. Create a service account on your AD that has permissions in Exchange.
    2. Setup a new Application Pool in IIS on your CAS servers – use the CLASSIC “Managed Pipeline mode”.
    3. Use the account created in #1 for the identity on the Application Pool.
    4. Create a new Application under “Default Web Site”
    5. Right click on your new application and go to “Advanced Settings” - Add the new Application pool, and set the “Physical Path Credentials” to the account created in step 1.
    6. Use NTFS permissions to provide access to the website.
    7. Use Windows authentication in your web.config

    Then, once someone is authenticated on the website, all Exchange processes are run as the service account created in step #1 - No impersonation needed.

    On your CAS server(s):

    Put the account you created in step 1 in the IIS_IUSRS local group on your CAS server(s)

    Then, you need to add the account to the CAS server(s) local policy "Act as part of the operating system" - follow the below steps:

    Open a command prompt
    Type secpol.msc and hit enter
    Wait a bit, for the "Local Security Settings" window to open
    In the left pane double click "Local Policies"
    Once again, In the left pane double click "User Rights Assignment"
    In the right pane, double click "Act as part of the operating system"

    Add the service account you created.

    Karl

    http://unlockpowershell.wordpress.com
    Co-Author, Windows PowerShell 2.0 Bible
    -join("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})
    su27User is Offline
    New Member
    New Member
    Posts:1
    Avatar

    --
    06 Dec 2010 04:20 AM
    I'm trying to use your scripts with Exchange 2010 but all I get is error:

    Compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).

    Source Error:

    Line 1:  public partial class MailboxTasks : System.Web.UI.Page
    Line 2:  {
    Line 3:      private void Page_Load(object sender, System.EventArgs e)


    Source File: c:\ASP\MailboxTasks.aspx.cs    Line: 1
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer