Link to home
Start Free TrialLog in
Avatar of boein
boein

asked on

Validating and Initializing a Message Store using Shell scripting

Hi,
I'm using Powershell to create new mailboxes and import existing pst's in it.  The mailbox creates just fine but the import fails.  It gives this error: " Error occurred in the step: Approving object. An unknown error has occurred., error code: -2147221219".  I have enough rights because I run the script as exchange admin.  If I setup outlook and look in the mailbox it's empty.  Afterwards, when I do the import again, it works fine.
My guess is that, when creating the mailbox the first time, the mailbox is empty, no mails but also no default mailfolders.  When you open the mailbox with outlook the first time, these folders are created.  So I need a shell script to 'initialise' a mailbox the first so the right folder structure is created.  Anybody knows how to do that?
Avatar of Suraj
Suraj
Flag of Australia image

Check if any inactive Domain controller showing up in AD Sites & Services ...

-x
Avatar of boein
boein

ASKER

Hi,
no only 2 active severs showing up.  Both are Global Catalog, can that be the problem?
Try to import the PST using Outlook, in this case it was having a Password
Protection.Put the passowrd and try importing it.
The passwod Protected PST's will not get Imported using inmport-mailbox command.

The above error can also occur on the machine from which 'Export-mailbox' is executed
whn the 'Default Gateway' is not populated on the NIC's properties. do you have the default gateway Set??
Let me know the results..
-x
Avatar of boein

ASKER

Hi,

Checked the network config, all seems to be OK with default gateway.  Also I'm always importing from the same computer, all pst's are on a network share.  The pst is not password protected, it's a test-pst with only a few mails in it.  I still believe it's because a new created mailbox misses the "standard" folders like "inbox","sent items","deleted items"...  Because I can import if I open the mailbox once.  
what do you think?
regards
Boein
You got a point there.. Give me some time.. i will research on this and get back to you...
thanks
Avatar of boein

ASKER

Any news on the research?
ASKER CERTIFIED SOLUTION
Avatar of boein
boein

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial