Powershell to move all databases to different array
Hi, I want to move all databases from one array to a different array keeping the same storage group name and file name.So,I want to move c:\sg1\mbdb1.edb and c:\sg2\mbdb1.edb to d:\sg1\mbdb1.edb and d:\sg2\mbdb1.edb. I'd appreciate any help with my script because I'm misconceptualizing something. get-mailboxdatabase -server usmail| foreach {move-databasepath -identity:$_Identity -edbfilepath e:\$_Identity.storagegroup\$_.edb -force -confirm:$false} --whatifThank you
August 19th, 2009 10:39pm

Try this:get-mailboxdatabase -serverusmail | foreach {move-databasepath -identity:$_.Identity -edbfilepath e:\$_Identity.storagegroup\$_.edb -force -confirm:$false -WhatIf}Note the "." between $_ and Identity, and that -WhatIf in enclosed in the brace.Karl
Free Windows Admin Tool Kit Click here and download it now
August 19th, 2009 10:54pm

Move-DatabasePathhttp://technet.microsoft.com/en-us/library/bb124742.aspxRegards,Xiu
August 21st, 2009 10:12am

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

Other recent topics Other recent topics