none
Exchange 2010 Mailbox Server Role Requirements Calculator PowerShell Script Issues RRS feed

  • Question

  • I'm having some issues with the powershell scripts that are generated with the Exchange 2010 Mailbox Server Role Requirements Calculator (v18.2); found here:

    http://blogs.technet.com/b/exchange/archive/2010/01/22/updates-to-the-exchange-2010-mailbox-server-role-requirements-calculator.aspx

    The Diskpart.ps1 script seems to contain a syntax error that causes the following behavior: 

    • The first volume and mountpoint are created correctly (i.e. volume is named correctly, volume is quick-formatted, etc.)
    • Subsequent volumes are not created correctly (i.e. volumes are named incorrectly, volumes are long-formatted, etc.) 
    • Subsequent mountpoints are not created 

    The issue seems to be contained in the following function:  

    function Configure-Disk()
    {
        for($Disk = $DiskStart; $Disk -lt ($DiskStart + $DiskCount); $Disk++)
        {
            if ((test-path $Diskmap[$Disk-$DiskStart]) -eq $false)
            {
                new-item $Diskmap[$Disk-$DiskStart] -type directory
            }
            $format = "format FS=NTFS UNIT=64k Label="+ (split-path $Diskmap[$Disk-$DiskStart] -leaf) + " QUICK"
            $mount = "assign mount="+ ($Diskmap[$Disk-$DiskStart])
            # Scripted diskpart will error out if it tries to do a command that is redundant.
            #  i.e. Online a disk that is already online.
            # To get around that without checking the status of each disk, we just divide the script into several
            #  commands and assume some might error out, but we forge ahead nonetheless.
            # The end result is that the disks get into the state we need.
            Run-diskpart "select disk $Disk","online disk"
            Run-diskpart "select disk $Disk","attributes disk clear readonly","convert MBR"
            Run-diskpart "select disk $Disk","offline disk"
            Run-diskpart "select disk $Disk","attributes disk clear readonly","online disk","convert GPT","create partition primary","$format","$mount"
        }
    }
    


    Rather than subsequent volumes (i.e. all volumes that are created after the first one) being named correctly, they are named something like "DB1QUICK", so obviously "QUICK" is becoming part of the disk label rather than being used as an attribute of the format command (which should tell the format command to perform a quick format vs. an exhaustive format.) 

     

    The CreateMBDatabases.ps1 script seems to contain a syntax error that causes the following error to be thrown:  


    Cannot process argument transformation on parameter 'EdbFilePath'. Cannot convert value ""C:\Mountpoints\DB1\DB1.edb""
    to type "Microsoft.Exchange.Data.EdbFilePath". Error: """C:\Mountpoints\DB1\DB1.edb"" is not an acceptable path. You mu
    st use an absolute, local, long file path, that does not contain '~'.
    Parameter name: path"
        + CategoryInfo          : InvalidData: (:) [New-MailboxDatabase], ParameterBindin...mationException
        + FullyQualifiedErrorId : ParameterArgumentTransformationError,New-MailboxDatabase
     
    Waiting one minute before attmepting mount of new database named DB1
    
    


    Any help would be appreciated! 

    Thanks in advance!

     

    Friday, December 16, 2011 9:26 PM