+1 I'd never have thought to do that. I've always gone the long way around.
- WJR On Sat, Feb 5, 2011 at 18:23, David Lum <[email protected]> wrote: > DOH! > > One little wildcard, why didn't I think of that? Thanks! See, I figured > there was an even easier way... > > Dave > > -----Original Message----- > From: Simon Butler [mailto:[email protected]] > Sent: Saturday, February 05, 2011 4:22 PM > To: NT System Admin Issues > Subject: RE: Knock me down a notch (aka some days, I am too proud of > myself) > > If the PST files are the same name as the alias on the mailboxes, then yes, > it is a lot of work. You could just do this: > > Dir C:\PSTFiles\*.pst | Import-Mailbox > > That’s it. > > It takes the list, and imports them in to the matching mailbox. > > Simon. > > > -- > Simon Butler > MVP: Exchange, MCSE > Sembee Ltd. > > e: [email protected] > w: http://www.sembee.co.uk/ > w: http://www.amset.info/ > w: http://blog.sembee.co.uk/ > > Need cheap certificates for Exchange, compatible with the iPhone? > http://CertificatesForExchange.com/ for certificates from just $26.99. > Need a domain for your certificate? http://DomainsForExchange.net/ > > Exchange Resources: http://exbpa.com/ > > > > -----Original Message----- > From: David Lum [mailto:[email protected]] > Sent: 06 February 2011 00:14 > To: NT System Admin Issues > Subject: Knock me down a notch (aka some days, I am too proud of myself) > > So today I am rolling back an abortive outsourcing Exchange attempt. Long > story but here's what gives me one of those "maybe I am Dr. Evil" moments. > > I have 600+ .PST files I need to import into Exchange 2007. The PST file > names match the mailbox names. > > Michael and other PS guru's probably have a better solution than mine so I > am game to here it, but here's my dorkatude: > > 1. In the directory with the PST's (about 100pst's per folder), I do DIR > > GROUPx.TXT > 2. Open said TXT file in Excel, setting columns to separate out file names > from other garbage (delete all columns except file names) > 3. Now having just the list of files, I add a columns to the left and right > 3a Column A is part of a powershell command dir D:\ExchangeImport\Groupx\ > 3b Column B is the list of PST file names > 3c Column C is | import-mailbox -Confirm:$false > 3d Column D is =A1&B1&C1 and concatenates each line into a tidy PS command > like dir D:\ExchangeImport\Group4\bob.johnson.pst | import-mailbox > -Confirm:$false > 4. Take column D and paste into Notepad and save as .PS1 file > 5. Run PS1 file > > Start to finish it's *maybe* 5 mins per group of PST's to make a .PS1 file. > > I laugh that overall it's command prompt, Excel, cut and paste to Notepad, > and PowerShell. In my particular case Excel isn't on the target box so I am > actually pasting to my local notepad and saving it before opening in Excel. > Also having 7 groups means I open 7 PowerShell sessions and let 'em rip > > So...am I actually clever, or is this really a long way around? > > Dave "2hs sleep might impair my judgement" Lum > > > ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ > ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ > > --- > To manage subscriptions click here: > http://lyris.sunbelt-software.com/read/my_forums/ > or send an email to [email protected] > with the body: unsubscribe ntsysadmin > > ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ > ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ > > --- > To manage subscriptions click here: > http://lyris.sunbelt-software.com/read/my_forums/ > or send an email to [email protected] > with the body: unsubscribe ntsysadmin > > ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ > ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ > > --- > To manage subscriptions click here: > http://lyris.sunbelt-software.com/read/my_forums/ > or send an email to [email protected] > with the body: unsubscribe ntsysadmin > ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ --- To manage subscriptions click here: http://lyris.sunbelt-software.com/read/my_forums/ or send an email to [email protected] with the body: unsubscribe ntsysadmin
