Basic Exchange journal archive PowerShell script

Published by:

One of my clients refuses to buy a proper email archiving solution so to accomplish generally the same goals (with more manual interaction), I wrote this basic script in PowerShell which exports the entire Journal to a PST and then removes it from the journal to recover the space within Exchange’s database.

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin
$endDateFormatted = Get-Date -format d 
$fileName = Get-Date -format MMMd-yyyy
$pstFile = "E:\Export\Journal-" + $fileName + ".pst"
Export-Mailbox -identity journal -IncludeFolders "\Inbox" -StartDate 01/01/2000 -EndDate $endDateFormatted -Confirm:$false -PSTFolderPath $pstFile -DeleteContent -Baditemlimit 1000
NET USE * /delete /y
$destination = "P:\Journal-" + $fileName + ".pst"
Move-Item $pstFile $destination
NET USE P: /delete /y

The following assumptions are made:

  • The Exchange Administration Tools are installed on the machine that this script is running on
  • You will be using the E: drive as a temporary storage location for the PST until the export complete
  • You have a specific share on the network that you will be copying the PST to when the export is complete
  • The drive letter P: is not automatically mapped when this user logs in

Quick Tip: iPhone zoomed in, can’t exit?

Published by:

I just had someone come to me with their iPhone where the view looked like it was zoomed in. She wasn’t sure what she had done or if the thing was broken, but she couldn’t use her phone regardless.

It turns out that she had inadvertently activated one of Apple’s Accessibility options which then zoomed in the entire picture. To get out of it, use three fingers and tap the screen anywhere there isn’t a button twice. This should zoom you back out of this mode and back to your phone in no time.

Quick Tip: AutoCAD LT installation missing “Create Deployment” option

Published by:

Have you tried to create an AutoCAD 2016 deployment using the portal, only to find that the stub installer that is downloaded doesn’t have that option? There’s a very simple solution that I only found by accident.

The stub installer is downloaded when you leave the default option of “WIN 32/64” selected immediately prior to the download through the portal. If you change that option to the single architecture you’re creating the install for (e.g. “WIN 64”) , you will get the full installer which will then allow you to choose “Create Deployment” as all the Autodesk literature explains in great detail.

Error message “Windows could not parse or process the unattend answer file for pass [specialize]” when deploying Windows 7 via MDT

Published by:

So I’ve been working on re-doing my MDT infrastructure and building new images and such, and came across a weird problem that doesn’t have a very intuitive solution.

I was able to inject the necessary drivers alright, I could capture the image just fine, but when it came time to deploying the new image to the PCs, I kept getting the error message:

Windows could not parse or process the unattend answer file for pass [specialize]

No matter how many times I rebuilt the Deployment Share or captured a new image, I kept getting that message.

Of course even 2 minutes of Googling would have saved me hours of wasted time.

The problem is that IE10 and above choke on one of the items in the unattend.xml file:

  1. Open Notepad as an administrator
  2. Open [Deployment Share folder]\Control\[Task Sequence folder]\unattend.xml
  3. Search for the IEWelcomeMsg line and then remove it
  4. Save the file

You should now be able to deploy the image without any further issues.