Archive

Archive for the ‘Powershell’ Category

DISM GUI 3.5 Released

February 13, 2013 16 comments

It’s been almost a year since the last release but I just uploaded DISM GUI 3.5 to the Codeplex site this morning.  It contains a few background bug fixes and a few new features.  For this version I have kept it compatible with the Windows 7 WAIK and DISM version.

  • Added Edition Servicing tab
  • Added the ability to apply and unattend file
  • Added application servicing tab

It’s not a major release but adds most of the features available in the Windows 7 DISM program.  You will notice that there is no “online” functionality to allow it to operate on the running OS.  That is something I had planned to put in but was proving hard than I thought with the current version.  I’m hoping to include that in version 4.0

Speaking of version 4.0.  I don’t have a timeframe to release it yet but I do have some of the features planned.

  • Online mode – Allow DISM to be used against the currently running OS.
  • Windows ADK compatibility – The next version will rely on the Windows ADK and DISM version included in it.
  • WinPE compatibility – I am planning on making the next version work inside WinPE.
  • Powershell backend – This one is still up in the air but I may convert the backend to the new Powershell cmdlets instead of relying on DISM.exe.
      There might be more features added but this is what I am planning now.  If you have a suggestion add it to the

Codeplex

    site.

Codeplex DISM site

Exchange 2010 Mailbox Moves from CSV file

October 3, 2012 7 comments

Recently during our Exchange migration I wanted a way to automate our mailbox moves.  Even though PowerShell makes this is very easy to script I couldn’t just use a normal filter because the mailboxes I am moving need go to one of three different databases.   I couldn’t use the New-MoveRequest cmdlet with a normal filter because none of the mailboxes had any common attributes to filter on.    Instead I created a CSV file with the mailbox name and the target databases.  In the past this would have meant many lines of VBscript code but with PowerShell this can all be done with a one liner!  Then using PowerShell I read this information in and pipe it over to the New-MoveRequest cmdlet to initiate the mailbox moves. 

My CSV file looks like this.

UserID TargetDB
User01 MBX01
User02 MBX03
User03 MBX02

The PowerShell script looks like this.

Import-Csv .\Filename.csv | % {New-MoveRequest -Identity $_.UserID 

-TargetDatabase $_.TargetDB}

I also created another one for ad-hoc moves.  This Powershell script allows me to specify the CSV file that I want to use instead of hardcoding it into the script.

 

$csvfile = Read-Host "Enter in the name of the CSV File that contains the mailboxes you want to move"

Import-Csv $csvfile | % {New-MoveRequest -Identity $_.UserID -TargetDatabase $_.TargetDB}

If you haven’t started using PowerShell for scripting tasks I highly recommend that you start looking into it.  It’s got a bit of a learning curve but it’s very powerful once your get a good grasp on it.

Categories: Exchange, Powershell Tags: ,
%d bloggers like this: