Getting Mailbox database doesnt exist with New-MoveRequest.
Im setting up a ps script to execute some mailbox moves in the evening. PS script will be executed via bat file in a scheduled task. The PS Command is as follows: Get-Content C:\Users\admin\Documents\users.txt | New-MoveRequest -TargetDatabase 075984749 -WhatIf Error: Mailbox database "75984749" doesn't exist. It cuts off the 0, I wonder if thats the issue, but I dont know how to fix that. Ive read the main cause of this error is permissions. But I can move mailboxes through the GUI in my account. I tried running as Administrator, no luck. Ideas?
June 6th, 2011 3:53pm

Try this. Say you call the ps1 file move.ps1. Create a batch job with the following command in it and save it as i.e. move.bat powershell -command "& {c:\temp\move.ps1}" Then go to scheduled task and point to that "move.bat". As long as the move.ps1 is in the correct location that the batch file will call the move.ps1.
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2011 1:20am

Are you able to move the mailbox manually? If yes than the issue is with the script.Gulab | MCITP: Exchange 2010-2007 | Skype: Gulab.Mallah | Blog: www.ExchangeRanger.blogspot.com
June 7th, 2011 2:52am

Ive been testing this in the exchange powershell and no luck, so I dont see Michael's idea working.
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2011 7:26am

Im setting up a ps script to execute some mailbox moves in the evening. PS script will be executed via bat file in a scheduled task. The PS Command is as follows: Get-Content C:\Users\admin\Documents\users.txt | New-MoveRequest -TargetDatabase 075984749 -WhatIf Error: Mailbox database "75984749" doesn't exist. Can you confirm that the DB start with 0 and the return error message starts with 7?
June 7th, 2011 8:48pm

It most definitely does.
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2011 9:29pm

Can you rename the DB and try again?
June 7th, 2011 9:32pm

Try putting the database name in single or double quotes: Get-Content C:\Users\admin\Documents\users.txt | New-MoveRequest -TargetDatabase '075984749' -WhatIfMike Pfeiffer | blog: mikepfeiffer.net | twitter: @mike_pfeiffer
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2011 9:48pm

I agree with Mike. Just test it with single and double quotes and it work. Give that a go.
June 7th, 2011 9:57pm

I remember trying that and it didnt take it either.
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2011 10:18pm

Can you rename the db and try it again?
June 7th, 2011 10:21pm

Yeah saw your post the first time. Not at work right now, Ill give it a shot during lunch to avoid downtime for users tomorrow.
Free Windows Admin Tool Kit Click here and download it now
June 7th, 2011 10:22pm

alright I switched from the 0 to the 1, so its now: 175984749. But it is now saying the database doesnt exist
June 8th, 2011 12:01pm

The shell is fine, something is wrong with either the name you're specifying whether it's not correct or some other reason. In either case specify the DN instead. [PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>Get-Content C:\temp\users.txt | New-MoveRequest -TargetDatab ase "CN=MDB01 TIER1,CN=Databases,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Or ganization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=corp,DC=dom" -WhatIfJames Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
June 8th, 2011 12:18pm

Yeah that definitely did it. Put it in my script, the batch file was able to execute the script. and all is well.
June 8th, 2011 1:49pm

Hi, As per my knowledge, the PS command is right except lack of single or double quotes. Maybe there are other reasons to this issue. And thank James for sharing the reply. ThanksPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2011 3:07am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics