16 Jun 2011 @ 4:55 PM 

I wrote a Powershell script today that moves a mailbox and then resets its AD permissions (To fix ActiveSync issues after moving from Exchange 2007 to Exchange 2010). Just thought i’d share it.

#© Daniel Stone, 2011 daenks at daenks dawt org
param([string]$Source, [string]$Destination)
if (!$Source) {
Write-Host “Please Specify a Source Store with the -Source parameter”
Exit -1
if (!$Destination) {
Write-Host “Please Specify a Destination Store with the -Destination parameter”
Exit -2

$i = 0
$ds = New-Object System.DirectoryServices.DirectorySearcher([ADSI]”LDAP://dc=quintanaminerals,dc=com”)
$Moves = Get-Mailbox -Database $Source
foreach ($mailbox in $Moves) {
$i = $i + 1
Write-Host $i
if ($i -eq 14)
Write-Host “15 Mailbox Limit Exceeded. Please allow the first 15 moves to complete before starting more.”
Exit -3
New-MoveRequest -Identity “$($mailbox.DisplayName)” -TargetDatabase $Destination
$ds.Filter = “(&(objectCategory=person)(objectClass=user)(cn=$($mailbox.DisplayName)))”
$DSResults = $ds.FindAll()
foreach ($item in $DSResults) {
$user = $item.GetDirectoryEntry()
Write-Host “Correcting Permissions for: $($user.sAMAccountName)”
#© Daniel Stone, 2011 daenks at daenks dawt org

I realize there are some improvements that i could make, like a LOT more error checking. But this will do for me for now 🙂

Oh yea, and WordPress messed up the indentation, sorry 🙂

Posted By: Daenks
Last Edit: 16 Jun 2011 @ 04:58 PM

EmailPermalinkComments (0)
 06 Jul 2009 @ 3:06 PM 

I spent several hours on the phone today with VMWare support writing a kickstart config file for my ESX 4.0 host.

There is some good news and some bad news about KickStart in ESX 4.0

Good News:

  • After installing from CD, ESX creates a ks.cfg file for you in /root that contains all the settings you used during install, so if you don’t plan on doing any additional configuration, you don’t even need to write a ks.cfg file.
  • There are a plethora of additional options that have been added since 3.5
  • KickStart files can be pointed to after booting from CD, where as previously (3.5) you had to have a PXE server to even think about an automated installation.

Bad News:

  • KickStart files from 3.5 are completely incompatible with 4.0
  • Because of CLI changes, any %post commands have to be re-planned
  • You can no longer use VMWare WebServices to generate a ks.cfg file from your current configuration. (This has been replaced with Host Profiles, which comes with ESX Enterprise Plus and vSphere Server)

Overall, I had a decent experience with support, and we ironed out my issues pretty quickly.  I learned a great deal about the new command structure in 4.0, which is similar enough to 3.5 t get the hang of quickly.

My biggest caveat wasn’t the creation of the KickStart file, but learning how to configure iSCSI from the command line, which I will share with you in a separate post. If you’re interested in seeing my KickStart file, you may do so here.


Posted By: Daenks
Last Edit: 06 Jul 2009 @ 03:19 PM

EmailPermalinkComments (0)
Tags: , , ,
Categories: vmware

 Last 50 Posts
Change Theme...
  • Users » 727
  • Posts/Pages » 8
  • Comments » 0
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight


    No Child Pages.