Enabling Exchange 2007 Mailbox

We are provisioning a mailbox to Exchange 2007 in IDM and we are being forced to run a PowerShell script which in turn runs some Exchange commands. These keep bombing out with an error saying that Exchange server is crashing (which it is not!). We have tested these scripts locally on the machine and they execute perfectly. We have also troubleshot up to the PowerShell execution which outputs test info but will not execute the Exchange items. Is there something that IDM needs to set in order to execute remote Exchange actions in PowerShell??

I've found the solution. The error I got was related to the DOS environment variables SET. So, I had to set inside my resource action all the variables I suppose I need to run the powershell. This is the code of my resource action:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
<Waveset>
<ResourceAction name='AfterCreate_AD'>
<ResTypeAction restype='Windows Active Directory' timeout='100000'>
<act>
@echo off
SET ALLUSERSPROFILE=C:\Documents and Settings\All Users
SET APPDATA=C:\Documents and Settings\zuser\Application Data
SET CLIENTNAME=T0001895481
SET ClusterLog=C:\WINDOWS\Cluster\cluster.log
SET CommonProgramFiles=C:\Program Files\Common Files
SET COMPUTERNAME=SUN-EM2QWM22QOR
SET ComSpec=C:\WINDOWS\system32\cmd.exe
SET FP_NO_HOST_CHECK=NO
SET HOMEDRIVE=C:
SET HOMEPATH=\Documents and Settings\zuser
SET LOGONSERVER=\\server
SET NUMBER_OF_PROCESSORS=1
SET OS=Windows_NT
SET PROCESSOR_ARCHITECTURE=x86
SET PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 8, GenuineIntel
SET PROCESSOR_LEVEL=15
SET PROCESSOR_REVISION=0408
SET ProgramFiles=C:\Program Files
SET SESSIONNAME=RDP-Tcp#6
SET SystemDrive=C:
SET SystemRoot=C:\WINDOWS
SET TEMP=C:\DOCUME~1\zuser\LOCALS~1\Temp
SET TMP=C:\DOCUME~1\zuser\LOCALS~1\Temp
SET USERDNSDOMAIN=server.domain
SET USERDOMAIN=domain
SET USERNAME=zuser
SET USERPROFILE=C:\Documents and Settings\zuser
SET windir=C:\WINDOWS
%comspec% /c C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe -PSConsoleFile "E:\Program Files\Microsoft\Exchange Server\Bin\exshell.psc1" -NoLogo -Noninteractive -Command ". Enable-Mailbox -Identity '%WSUSER_canonicalName%' -Alias '%WSUSER_AdMailNickName%' -Database '%WSUSER_AdServername%' -DomainController %WSUSER_AdDomainController%"
exit 0
</act>
</ResTypeAction>
</ResourceAction>
</Waveset>
Hope it helps

Similar Messages

  • Error during Exchange 2007 mailbox provisioning with IDM 8.1.1.1

    Hi
    We want to create Exchange 2007 mailboxes from IDM.
    When we let Exchange set the SMTP address (EmailAddressPolicyEnabled=true), it works fine
    But when we set the SMTP address in IDM with the attribute PrimarySmtpAddress (and EmailAddressPolicyEnabled=false) there are an error and an information in the provisioning task
    Error : PowerShell:6c13f14c-3825-4064-a585-48b4756de3a3 is not a mailbox user
    Information : Added exchange mailbox to the user based on the RecipientType change from: 'User' to: 'UserMailbox'
    We see that the mailbox has the SMTP address set by Exchange.
    After 5mn, the task ends successfully and we see that the SMTP address is the one set by the IDM attribute PrimarySmtpAddress.
    We guess that this error is caused by the active directory replication delay between controllers.
    Does anybody know how to solve this problem ?
    Thank you

    Hi Patrick
    Thank you for your answer.
    The cmdlet enable-mailbox can be used with the PrimarySmtpAddress option and, in this case, the EmailAddressPolicyEnabled option is automatically set to false.
    Cf. the MS technet help : "The PrimarySmtpAddress parameter specifies the primary SMTP address for the mailbox. By default, the primary SMTP address is generated based on the default e-mail address policy. If you specify a primary SMTP address by using this parameter, the command sets the EmailAddressPolicyEnabled attribute of the mailbox to $false, and the e-mail addresses of this mailbox aren't automatically updated based on e-mail address policies."
    I have tested this option on our Exchange 2007 environment and it works fine.
    In IDM if PrimarySmtpAddress is used but not EmailAddressPolicyEnabled, there is an error : "PowerShell:The e-mail addresses for this recipient are automatically generated based on e-mail address policies. To modify the primary SMTP address for this recipient, you must disable automatic updating of e-mail addresses based on e-mail address policy”
    If PrimarySmtpAddress is used and EmailAddressPolicyEnabled is set to false, then the log shows that 2 powershell commands are run by the gateway, the second immediately after the first.
    Enable-Mailbox with the parameters -Identity and -Database, run with no error
    Set-Mailbox with the parameters -Identity, -EmailAddressPolicyEnabled (set to FALSE) and -PrimarySmtpAddress, run with the error “…is not a mailbox user.”
    After 5 mn (the retry delay) another powershell command is run :
    Set-Mailbox with the parameters -Identity, -EmailAddressPolicyEnabled (set to FALSE) and -PrimarySmtpAddress, run with no error.
    The solution would be that IDM, when PrimarySmtpAddress is set, runs only the command Enable-Mailbox with the parameters PrimarySmtpAddress, which set automatically EmailAddressPolicyEnabled to FALSE
    Gilles

  • How to connect Exchange 2007 mailboxes to existing users

    Hi all
    We use IDM/Waveset 8.1.1 and the Active Directory adapter for Exchange 2007 mailbox provisioning. We use a role for the AD account and a role for the Exchange mailbox.
    When we add the Exchange role for a user, the mailbox is created (the IDM gateway sends the powershell command enable-mailbox) => it is fine.
    When we remove the Exchange role for the same user (after some mails have been sent with this mailbox), the mailbox is disconnected (the IDM gateway sends the powershell command disable-mailbox) => It is also fine.
    But when we add a second time the Exchange role for the same user, a new mailbox is created, while we want that the disconnected mailbox would be re-connect to the AD account (with the powershell command connect-mailbox).
    Does anybody know if it is possible to do so ?
    Thank you
    Gilles

    As long as your I.T. folks have the same DNS name pointed to the server from the inside as they do from the outside, it should work fine. To be clear, if your server is mail.company.com that name should oint to the server from inside and outside the company. Then it will work fine without any changes on your iPhone.

  • Migrate exchange 2007 mailboxes to exchange 2013

    Hi Guys,
    im trying to move exchange 2007 mailboxes to 2013. to cut to the chase, is this possible because im getting different kinds of errors?
    Please advise if this is possible and how to do it.
    Thanks!

    Hi,
    Below link also will help you
    Microsoft Exchange Server Deployment Assistant
    http://technet.microsoft.com/en-us/office/dn756393.aspx
    Before migrating exchange server, Make a plan
    try to practcice on lab. " Production environment and practice lab is entire different"
    I dont know your environment. Hope your Domain controller and Exchange environment is residing in same place. If it is different site, move FSMO roles to that site for installing purpose.
    IT is really challenge and excitement .
    Try to find the solution of client outlook connectivity,
    I had this problem, after I install Cumulative update, this problem gone.
     Login ECP console after install exchange server,
     Certificate installation,
    DNS pointing, port forward,
    Apply auto discover.
    I faced another issue as well during the installation. My ex admin upgraded exchange server 2003 to 2007. He may not uninstall exchange server 2003 properly. Exchange server
    2003 record was in active directory. Exchange 2013 doesnt suport mixed version of exchange 2003 and 2013. I have to delete the Exchange server 2003 record under DNS and Adsiedit. After that only exchange server 2013 allow to continue to install.
    Best of Luck " Nothing is impossible"
    Regards,
    Joby

  • Exchange 2007 mailbox creation error

    Hi,
    We are having problems with our standard AD/Exchange adapter when creating users with a mailbox.
    We currently have the following setup:
    - Sun IdM 8.1.0.7
    - There are 4 DC, and two Exchange 2007 Servers.
    - The gateway runs on a seperate Win2003 R2 32 bit server (but is a member of the AD).
    The error we are getting is this:
    PowerShell:41b59779-b9cb-487f-b200-4b9836dc176d is not a mailbox user.
    It seems like the gateway has a preferred DC when creating accounts.
    But when creating the Exchange account, the Exchange server has a different preferred DC,
    where the AD account is not yet present. (there is an 5 minute replication interval)
    We don't have a test enviroment with the same setup, which makes it a bit tricky to find the problem,
    and testing possible solutions for it. Out test enviroment consists only of 1 DC, and 1 Exchange server so
    the errors does not exist there.
    Is there anyone who has seen something like this before, and in that case, is there a solution for it?
    Or it's maybe better if a put it like this: Is there anyone who is running multiple DC:s and multiple Exchange Servers
    without these problems? And in that case, are you creating the user and the mailbox at the same time?
    I would gladly provide some more info and logs, if you specify what might be interesting to see.
    Thanks and kind regards,
    Henrik

    Some additional info:
    Today the process goes like this:
    First we create the user and does not set the RecipientType -> The user is created in AD (without Mailbox)
    Second we set the following attributes when we want the user to get a Mailbox: (5 min delay)
    EmailAddressPolicyEnabled = false
    PrimarySmtpAddress = [email protected]
    RecipientType = MailboxUser
    Database = <our-db-here>
    The user now gets his mailbox, but the email generated by Exchange is used when I look at the user.
    And also the EmailAddressPolicy stays enabled.
    Any ideas about the attributes I'm trying to set here?
    Regards,
    Henrik
    Edited by: user1154522 on Apr 12, 2011 8:44 AM

  • Redirection loop detected while opening Exchange 2007 mailboxes through Exchange 2013 OWA page

    Team, in our infra Exchange 2013 CU8 & Exchange 2007 SP3 RU15 running. Exchange 2013 recently deployed but while opening exchange 2007 users mailbox through 2013 OWA getting error "Redirection loop detected". Want to update you few things :
    Public DNS record created as mail.myinfra.in with x.x.x.2 IP and legacy.myinfra.in with x.x.x.3 IP.
    Virtual directory modified mail.myinfra.in for 2013 & legacy.myinfra.in for 2007.
    All the OWA request need to pass through public DNS only no internal DNS record for OWA.
    Through ISA already rule created and tested also like https://mail.myinfra.in/owa giving me 2013 OWA page & https://legacy.myinfra.in/owa giving 2007 owa page. Only problem while opening https://mail.myinfra.in/owa with 2013 mailbox id/pwd working fine
    but with 2007 mailbox id/pwd giving error "Redirection loop detected".
    Appreciate if you can help quickly.

    Hello
    tip: check iis log on both of exch servers and check  owa  application haven't got "HTTP redirect" enabled.
    sorry my english

  • Powershell command to migrate Exchange 2007 mailbox databases with a legacy name, & import them into a new 2007 instance, with a new name.

    Hi All. I am currently at the later stage of provisioning a new CCR Exchange 2007 migration (to
    virtualise old Exchange 2007 hardware) for 5,000 users & have a quick question.
    I have created around 15 newly named storage groups, & have named 1 new DB per group, with the same name (let's say New-DB-1), residing within them.  The problem I have, is the old legacy DB's have different names (let's say Old-DB-1) & I need
    to import them into the new storage groups, to match the new names. So far I can import/export between old & new OK if both old & new DB names\folders etc. names marry up perfectly, but are unable to if there not the same. Does anyone have any thoughts
    on how best to tackle this, as this is one of the final hurdles stopping the migration? Many Thanks, John 

    Hi All
    Many Thanks for the feedback.
    The terminology 'migrate' was used based around the fact I will be decommissioning the old 2007 physical environment. This is after moving all DB's over to the new newly created Virtual environment that will host all roles.
    The solution I ended up using yesterday, was the following:
    1) Dismounted the relevant named DB (NEWDB) in the new environment.
    2) I then ticked the 'This database can be overwritten by a restore option' box.
    3) Copied over the old named DB (OLDDB) to the same location, & overwrote using the new name (NEWDB).
    4) Re-mounted the (NEWDB).
    5) Ran the following 2 PowerShell commands:
     Get-mailbox –database OLDDB | move-mailbox –targetdatabase NEWDB -configurationonly:$true
     Get-MailboxDatabase NEWDB | ResetSearchIndex.ps1 -force
    6) Checked to make sure the clients were working ok, in the now the new (NEWDB) environment.
    Rich: Many thanks for your PS script, which I will test with future DB moves & provide feedback
    J
    John.

  • How to create custom folder in every mailbox of Exchange 2007 mailbox : not using Managed folder

    Hello ,
    We want to create custom folder in mailbox as root or inside inbox for every user of mailbox but not using managed folder .
    I have found below article , but we do not get success to do that .
    http://careexchange.in/create-a-custom-root-folder-in-all-the-mailboxes-bulk-in-exchange-2010/
    Any idea how to do that ?
    It will be great helpful for  us.
    Thank you in advance.
    Regards
    faiz

    What happens when you try that method? What errors do you get? Have you ensured you've installed EWS 1.2 per the requirements listed in the script? (it actually mentions 1.1, but that no longer seems to be available, but 1.2 is here
    http://www.microsoft.com/en-gb/download/details.aspx?id=28952 ).
    I'm assuming you're running Exchange 2007 (since you're posting in the 2003/2007 forum, and this won't work on 2003), is that correct?
    While I don't know for sure that the script will work on 2007, have you ensured that you've amended the file paths to the correct locations? Eg, assuming it should work you'll need to amend the line :
    $service = New-Object Microsoft.Exchange.WebServices.Data.ExchangeService([Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP1)
    to reflect the version of Exchange you're running, and the line :
    Import-Module -Name "C:\Program Files\Microsoft\Exchange\Web Services\1.1\Microsoft.Exchange.WebServices.dll"
    with whatever version of EWS you've installed.

  • Decommission Exchange 2007 Mailbox Server from Cluster

    Hi! I realize this is an Exchange 2013 forum, however as I do not see any forums for older flavors of Exchange I'm going to post this here. If a better forum exists please let me know and I'll happily move to that forum for my answers.
    I am just finishing a migration from Exchange 2007 to Exchange 2013.  In the Exchange 2007 environment I have 2 CCR Mailbox Clusters.  While working to decommission the first of the two clusters I successfully evicted the passive node, however
    I mistakenly evicted the active node rather than removing it by running the Exchange Setup Wizard as outlined in the TechNet article "How to Remove the Active Mailbox Role from a CCR Environment".
    Now, when attempting to uninstall Exchange 2007 using the Setup Wizard in Add/Remove Program I get the following error during the prerequisite check for the 'Mailbox Role':
    Error:
    Exchange server FQDN was not found. Please make sure you have typed it correctly."
    Setup then completes.
    Is there a way to cleanly uninstall Exchange 2007 and clean-up Active Directory?
    Thanks!

    Hi Jesse,
    Thank you for your question.
    We could run “ADsiedit.msc” in run, then navigate
    Configuration [<domainController>.contoso.com]> CN=Configuration,DC=contoso,DC=com> CN=Services> CN=Microsoft Exchange> CN=<OrganizationName> CN=Administrative Group> CN=Exchange Administrative Group>CN=Server
    We could check if mailbox server is existed in this container, we could remove it.
    Notice: Before we remove it, we could make a backup for AD database. We suggest you call MS engineer for help.
    If there are any questions regarding this issue, please be free to let me know. 
    Best Regard,
    Jim
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Jim Xu
    TechNet Community Support

  • Long time creating Exchange 2007 mailbox

    Hi everybody.
    I´m creating a mailbox in Exchange 2007 when provisioning users in AD, and it looks fine. The problem is the time spent in doing it (approximately 2:30 minutes). I´ve been researching but did not solved it.
    Any idea of what could be the cause?
    Regards.

    Hi Rookie,
    as a matter of fact, you are quite ahead of the rest of us.
    I have tried over and over to create Mailboxes using the Exchange 2007 in IDM. But, so far, unsuccessfully.
    Creating users in AD works fine. For some reason, IDM refuses to create mailboxes.
    if you have actually succeeded in accomplishing this (albeit slowly), I would love to know how you did it.
    Thanks

  • Disable exchange 2007 mailbox

    Hi all,
    I got the requirement to not only disable accounts in Active Directory but to disable their mailbox as well. So they should not be able to receive messages while they are unable to access their mailbox.
    I'm a lucky guy, so I found this entry in the changelog, regarding patch 10 for 8.0:
    "21203 exchange 2007: allow disable of a mailbox without deleting the AD user"
    This sounds exactly like the solution to my requirement, but sadly I failed to find any documentation? So it is nice that I'm able to disable a mailbox, but HOW can I do this?
    Any help would be greatly appreciated.
    CU,
    Patrick.

    Hi Patrick-
    I believe what you'll want to do is: check out the "RecipientType" for the user(s) in questions and change it from: 'UserMailbox' to 'User'. This should disable the mailbox without deleting the AD user. This was the change/functionality brought on by bug # 21203.
    You'll need 7.1.1.18 or later, 8.0.0.10 or later, or 8.1.0.4 or later.
    Regards,
    Alex

  • Quick question about exporting email address and their alias from Exchange 2007 mailbox

    Hi Everyone,
    We have Exchange 2007 and 2013 servers. All users are still 2007 servers. I have a list of users around 179 out of 3000 in a CSV file. I would like to export those 179 users primary smtp and their aliases. Is it possible to achieve through any script?
    Thanks in advance.
    Regards,
    Siva

    Hello Siva,
    You don't need a script for this. Information can be obtained with simple command.
    $AllUsers = Get-Mailbox -ResultSize Unlimited | Select DisplayName,Alias,PrimarySMTPAddress,SamACcountName,Database,LegacyExchangeDN
    $AllUsers | Export-Csv Outputfile.csv -NoTypeInformation
    Try this and let me know if it helps!
    if you want PrimarySMTPAddress and alias of only those users whose information on the excel sheet, then what do you have as the column name in the excel sheet which you are using to query on the server.
    Considering that you are using Alias to query the server to get the details you can try below:
    $Global:Output = @()
    $CsvData = Import-Csv Inputfile.csv
    foreach($line in $CsvData)
    {$CurrentObject = $Line.AliasWrite-Host “Processing Obect “$CurrentObject “From Csv File”
    –ForeGroundColor YELLOW$EmailIDJoin = ""$EmailAddresses = @()$UserInfo = "" | Select DisplayName,PrimarySMTPAddress,Alias,SamAccountName,Database,LegacyExchangeDN,EmailAddresses
    $UserInfo.DisplayName = (Get-Mailbox $CurrentObject).DisplayName
    $UserInfo.PrimarySMTPAddress = (Get-Mailbox $CurrentObject).PrimarySMTPAddress
    $UserInfo.Alias = (Get-Mailbox $CurrentObject).Alias
    $UserInfo.SamAccountName = (Get-Mailbox $CurrentObject).SamAccountName
    $UserInfo.Database = (Get-Mailbox $CurrentObject).Database
    $UserInfo.LegacyExchangeDN = (Get-Mailbox $CurrentObject).LegacyExchangeDN
    $EmailAddresses = (Get-Mailbox $CurrentObject)|%{$_.EmailAddresses}
    for($i=0;$i -lt $EmailAddresses.Count;$i++)
    $EmailIDJoin += $EmailAddresses[$i].ProxyAddressString
    if($i -lt $EmailAddresses.Count - 1)
    $EmailIDJoin += ','
    $UserInfo.EmailAddresses = $EmailIdJoin
    $Global:Output += $UserInfo
    #Export output to CSV File
    $Global:Output | Export-Csv GlobalOutput.csv -NoTypeInformation

  • Exchange 2007 mailbox migration question

    Hi, I'm using Exchange 2007 and had most of my mailboxes are currently on a single mail server. I recently built two new mail servers and used CCR. I have 7800+ mailboxes and was told that when I move the mailboxes from the old mail server to the new
    mail server that this will create a huge amount of additional transaction logs that wouldn't be cleared out until the next backup. We do nightly backup and have 1 TB of free space on our log drive. I can't find anywhere that documents that moving mailboxes
    from one mail server to another would create additional transaction logs. I could understand the existing transaction logs would follow the mailboxes to the new mail server, but I don't see where it would create new transaction logs? I'm planning on moving
    only 200-300 mailboxes a night, so this wouldn't happen all at once.
    Any clarification would be helpful.
             Thanks,
              Andrew

    Agree with Cara on this and the transaction logs can be fairly hefty in size when migrating a bunch of data.  One other option would be to;
    1. do a backup of the associated stores/database right before migration.
    2. then run on circular logging for those all databases within a storage group which will keep the logs in check
    3. upon completion turn circular logging OFF, do a full backup and proceed along your way.
    There is however some risk with using circular logging and you should read the articles below
    http://exchangeserverpro.com/ems-enabledisable-exchange-server-2007-circular-logging/
    http://technet.microsoft.com/en-us/library/bb331968%28v=exchg.80%29.aspx
    http://technet.microsoft.com/en-us/library/bb331951%28v=exchg.80%29.aspx
    http://blogs.technet.com/b/scottschnoll/archive/2011/06/27/circular-logging-and-mailbox-database-copies.aspx
    Of course you could also keep things as they are and then monitor disk space and log volume during migration and as things rise Execute a Full backup to clear/truncate the logs.  Technically its safer to do this then turn on circular logging but its
    allot more resource intensive all the way around.   Another option would be to schedule several full backups during the migration process, i.e. every NN hours etc and then the backups will happen automatically and all should be well as long as the
    backups complete before the disk runs out of space from log file generation
    Search, Recover, & Extract Mailboxes, Folders, & Email Items from Offline Exchange Mailbox and Public Folder EDB's and Live Exchange Servers or Import/Migrate direct from Offline EDB to Any Production Exchange Server, even cross version i.e. 2003 -->
    2007 --> 2010 --> 2013 with Lucid8's
    DigiScope

  • Deleting the old Exchange 2007 mailbox entry safely from ADSI Edit ?

    Hi,
    I'm having problem with the old Exchange maiilbox 2007 CCR cluster name still showing whenever I use the Powershell script:
    Get-MailboxServer | Select Name, AdminDisplayVersion, ServerRole, ExchangeVersion, IsValid, ExchangeLegacyServerRole, DistinguishedName
    Can anyone please assist me what to backup first before so that I can safely remove / delete the following highlighted entry from my domain controller:
    Is that the correct location where I can safely delete the old Exchange Server mailbox entry ? All of our Exchange Servers are 2010 SP2.
    There is also the computer object named MAILBOX when I do the search in
    Active Directory Users & Computers console.
    So can anyone please clarify if this is the best and safest way to do without causing any email downtime ?
    /* Server Support Specialist */

    Hey there,
    You need to ensure that you have the following backups in order to proceed with the decommissioning process:
    1. System State Backup of your Active directory
    2. Exchange Database Flat file Backup
    3. Run ExBPA Report and Export the Report for future reference.
    4. Go to Registry Editor and Export “My Computer” as Registry backup.
    Yes you are at the right location to safely delete the old Exchange Server mailbox entry .
    The best & cleanest way is to delete the whole server object. This wouldn't break your Exchange 2010 configuration. But make sure you don't delete the “Servers” folder itself.
    Feel free to revert back for further queries
    Thanks
    ~Phil

  • How to decomission a Exchange 2007 Mailbox server

    Hello, 
    We are running Exchange 2007 SP3 servers. We currently have a Mailbox server we want to decommission. I'd like help on how to achieve this. I want to make sure that all mailboxes have been moved from that server and remove the Public Folder database as well.
    I understand that the Public Folders needs to stop replicating to this server, can someone please guide me on how to do that?
    All kinds of help are appreciated. Thanks!

    For the public folder stuff, see these scripts: https://technet.microsoft.com/en-us/library/aa997966(v=exchg.141).aspx
    The system folders can be replicated with the '\non_ipm_subtree' identifier, but some system folders are per-server and don't need to replicate.  OAB distribution however
    is one that might matter.
    Mike Crowley | Microsoft MVP
    Baseline
    Technologies

Maybe you are looking for