Archive

Archive for December, 2009

I’m Giving Up On NetNewsWire (for now)

December 14th, 2009 Justin Braun No comments

I’ve been very loyal to NetNewsWire for a long time. Whether it be NewsGator (a RSS plugin for Outlook), FeedDamon (an RSS feedreader app for Windows, NetNewsWire on the iPhone, or NetNewsWire on the Mac.

In the fall, NetNewsWire was switched to synchronize with Google Reader accounts. I just can’t take the inconsistencies in synchronization that occur when using NetNewsWire on my Mac. I spend an hour or two going through a couple hundred or more news items all for them to reappear as unread items next sync period – sometimes, other times they stay unread.

NetNewsWire is a desktop RSS application for the Mac. You can use it for free with embedded advertising, or you can buy it for $20. I’m all about supporting developers who write apps – but I can’t do that for NetNewsWire.

The best alternative that I could find for now is an app called Gruml.  Gruml also allows you to view and manage your feed subscriptions of your Google Reader account on Mac OS X.  It is in the beta stage, so there are some quirks, but the developer was releasing updates pretty regularly until the middle of November. Hopefully there is a final release or something big up his sleeve.

Nonetheless, Gruml at least gets it write when it comes to the synchronization, so for now, it’s my choice for a desktop RSS reader.

Categories: Reviews, Software Tags:

Exchange 2010: Database Copies with PowerShell

December 9th, 2009 Justin Braun No comments

I needed a quick and dirty method to add database copies to other servers in an Exchange 2010 Database Availability Group (DAG).  I had three servers, each with 10 databases.  Each one of those databases should have a copy on the other two servers. 

Now, this is painful if you have to use the GUI to do it – not that it takes a lot, but it’s time consuming.  The Add-MailboxDatabaseCopy cmdlet is very helpful in PowerShell, but still I wanted to automate it since my naming conventions were pretty standard.

So, I wrote a PowerShell script to automate this process.  Essentially, the script has a few variables and I dome some loop magic to drop everything into place. 

$servers = "E2K10MBX01", "E2K10MBX02", "E2K10MBX03"
$databases = "DB1", "DB2", "DB3", "DB4", "DB5", "DB6", "DB7", "DB8", "DB9", "DB10"
 
foreach($database in $databases)
{
       foreach($server in $servers)
       {
              foreach($copyserver in $servers)
              {
                     "Adding mailbox copy for $server-$database to $copyserver..."
                     Add-MailboxDatabaseCopy -Identity $server-$database -MailboxServer $copyserver -ErrorAction "Continue"
              }
       }
}

This script is quick and dirty for a lab environment.  Keep in mind that this doesn’t do any error checking and there is no validation to see if a database is already homed to a server.  This just uses the cmdlet to try to create the database copy; if it is successful, you’re good to go.  If it fails, the script just keeps on rolling.  No harm, no foul.

Categories: Exchange, PowerShell Tags:

Exchange 2010 Pre-Req Setup (Updated)

December 9th, 2009 Justin Braun No comments

A couple of months back I wrote a post on how to automatically install pre-requisites for Exchange 2010 on a Windows 2008 (including R2) server.

I specifically talked about a method for doing this with ServerManagerCmd.exe, which is included with Windows Server 2008.  However, in Windows Server 2008 R2, ServerManagerCmd is deprecated and the recommended method is to use PowerShell (as pointed out by my buddy, Josh). 

The Add-WindowsFeature cmdlet in PowerShell provides the capability to add individual Windows features directly from a script.  You can use Get-WindowsFeature to obtain a detailed list of available features, ones that are installed, and their “official” name if you wish to install them via PowerShell.

To install the required pre-reqs for Exchange 2010, from a PowerShell prompt, be sure to add the Server Manager module so the Add-WindowsFeature and Get-WindowsFeature cmdlets are available.

Import-Module ServerManager

Once you have imported the module, then you can use Add-WindowsFeature to take care of the rest.

Add-WindowsFeature -Name RSAT-ADDS-Tools, RPC-over-HTTP-proxy, NET-HTTP-Activation, Web-Dyn-Compression, Web-Windows-Auth, Web-Digest-Auth, Web-Basic-Auth, Web-Lgcy-Mgmt-Console, Web-Metabase, Web-ISAPI-Ext, Web-Server -Concurrent

Categories: Exchange Tags:

Legislation Would Limit Early Termination Fees

December 3rd, 2009 Justin Braun No comments

I don’t normally follow politics, but my own Senator from the state of Minnesota, Amy Klobuchar and other senate colleagues introduced a bill today that would limit the amount of cell phone service provider could charge in early termination fees.

The timing is perfect since Verizon recently announced that their customers who were smartphone users would have to pay in upwards of $300 if they prematurely ended their relationship with the provider.  How ridiculous!

Several years ago, I did pay Verizon $175 to end our relationship. 

“Changing your wireless provider shouldn’t break the bank,” said Klobuchar. “Forcing consumers to pay outrageous fees bearing little to no relation to the cost of their handset devices is anti-consumer and anti-competitive.”

I have to agree.  Instead of spending the money on litigation with AT&T, both carriers should put that money towards getting their networks in better shape, especially AT&T.  The iPhone has been a goldmine for AT&T, but their network has subsequently suffered and become unbearable to use.  Between dropped calls and general coverage issues, I can barely stand to keep their service at this point.  Most customers can’t afford to switch carriers – and I’m not talking about those who bought an iPhone.

According to Senator Klobuchar’s website, the bill would:

- Prevent wireless carriers from charging an ETF that is higher than the discount on the cell phone that the wireless company offers consumers for entering into a multi-year contract.  For example, if a wireless consumer enters into a 2-year contract and receives a $150 discount with the contract, the ETF cannot exceed $150.

- Require wireless carriers to pro-rate their ETFs for consumers who leave their contracts early so that the ETF for a two-year contract would be reduced by half after one year and pro-rated down to zero by the end of a contract term.

- Require wireless carriers to provide “clear and conspicuous disclosure” of the ETF at the time of purchase.

- Require monthly billing statements to clearly state the pro-rated fee customers would be charged if they terminate their contracts before the end of the next billing cycle.

I think most customers are pretty loyal to their carriers.  Most customers see an average bill between $90-$200/month.  Your customers are paying plenty to stay connected – if you as a carrier can’t get the job done, then the customer should have the right to go somewhere that can.

If you’re interested in more about the bill, check out Senator Klobuchar’s press release.

Categories: Technology Tags:

Compellent Volume Reporting with PowerShell

December 2nd, 2009 Justin Braun No comments

Compellent Enterprise Manager works great for managing your Storage Center environment and providing reports on volume usage and utilization.

I was looking for a little different spin on the information.  I was looking for a cumulative volume count across an entire Storage Center, plus a total count of replays on the system, and how many of the volumes that exist are actually mapped up to a server object.

For example, the test system that I ran my script on determined that we had over 900 volumes with over 3,000 replays.  We also realized that we had some cleanup to do when we figured out that only 180 of the volumes were actually mapped up.

I did build into the script to collect the page count of each replay so you could tell how large they were if you wanted to; just the calculation needs to be added.

# NAME: VolumeInfo.ps1
# DESC: PowerShell script to report on volume information
# BY  : Justin Braun, Compellent Technologies, Inc.
# DATE: December 1, 2009
# VER : 1.0
#
# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND.  THE ENTIRE
# RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
#
# NOTE: This script assumes a default Get-SCConnection already exists.
 
# Collection
$colVolumes = @()
 
foreach($volume in Get-SCVolume)
{
    Write-Host "Gathering volume data for $volume.Name..."
    
    $replays = $null
    $mappings = $null
    $pagecount = 0
    
    # Volume Information
    $ReportData = New-Object System.Object
    $ReportData | Add-Member -Type NoteProperty -Name "Volume Index" -Value $volume.Index
    $ReportData | Add-Member -Type NoteProperty -Name "Volume Name" -Value $volume.Name
    $ReportData | Add-Member -Type NoteProperty -Name "Volume Size" -Value $volume.Size
    $ReportData | Add-Member -Type NoteProperty -Name "Block Count" -Value $volume.BlockCount
    $ReportData | Add-Member -Type NoteProperty -Name "Created By" -Value $volume.CreateUser
    $ReportData | Add-Member -Type NoteProperty -Name "Created On" -Value $volume.CreateTime
    $ReportData | Add-Member -Type NoteProperty -Name "Modified By" -Value $volume.ModifyUser
    $ReportData | Add-Member -Type NoteProperty -Name "Modified On" -Value $volume.ModifyTime
    $ReportData | Add-Member -Type NoteProperty -Name "Folder" -Value $volume.ParentFolder
    
    # Replay Count Information
    Write-Host "Gathering replay information for $volume.Name..."
    $replays = Get-SCReplay -SourceVolumeIndex $volume.Index
    $ReportData | Add-Member -Type NoteProperty -Name "Replay Count" -Value $replays.Count
    
    # Replay Cumulative Page Information
    Write-Host "Gathering replay page count information for $volume.Name..."
    foreach($replay in $replays)
    {
        $pagecount += $replay.OwnedPageCount
    }
    
    $ReportData | Add-Member -Type NoteProperty -Name "Total Replay Pages" -Value $pagecount
    
    # Volume Mapping Information
    Write-Host "Gathering volume mapping information for $volume.Name..."
    $mappings = Get-SCVolumeMap -VolumeIndex $volume.Index
    
    if($mappings -eq $null)
    {
        $ReportData | Add-Member -Type NoteProperty -Name "Mappings" -Value "No"
    }
    else
    {
        $ReportData | Add-Member -Type NoteProperty -Name "Mappings" -Value "Yes"
    }
    
    # Add to collection
    $colVolumes += $ReportData
    
}
 
# Outfile ReportData Contents
Write-Host "Writing output file..."
 
$colVolumes | export-csv -path "c:\volumeinfo.txt"
 
Write-Host "Done!"

If you have any ideas on how this script could be more useful in your environment, drop me a comment below.

Sony BDP-N460 Network Blu-ray Disc Player Review

December 2nd, 2009 Justin Braun No comments

I was at Costco this last weekend and saw the Sony BDP-N460 Network Blu-ray Disc Player on sale for $199.  It usually sells for $249, but most places have it on sale right now.  As a side note, I wasn’t able to locate it on their website, but it was on an end-cap in one of their stores.

A while back, right after Blu-ray was initially introduced, I purchased the Best Buy “Insignia” brand Blu-ray player.  I think I paid $250 for it.  Back then, if you wanted network capabilities, you had to pay a premium, now this type of functionality is pretty standard. 

The Insignia model that I owned was slow to start up.  It took 30-45 seconds for it to power up before I could even insert a disc.  You can’t upgrade the firmware on it, and there are no network capabilities.

BDPN460_1

That’s why the Sony was appealing.  The BDP-N460 has full HD 1080p, Dolby True HD and DTS-MA audio decoding, BRAVIA Internet Video streaming, BD-Live 2.0 support, DVD playback and upscaling.  It has built-in applications for Netflix, Amazon Video On-Demand, and Slacker, just to name a few.

I hooked it up to my system, plugged in a network cable and powered it up.  It immediately determined that there was a firmware update available and within a couple minutes it had applied it and rebooted the player.  That’s cool. 

I also activated the Netflix application on the player.  I was able to see my queue and I played three different movies over the weekend.  It worked very slick.  No glitches as far as I could tell.  No skipping, very good video and sounds quality.  I also tried Slacker, a free Internet radio service, which I had never heard of. 

One other nicety of this product is that they include an HDMI cable in the box.  Overall, I am very happy with the player.  Historically, I have always had good luck with Sony components. 

Categories: Reviews, Technology Tags:

PowerShell with Compellent and Exchange 2010

December 2nd, 2009 Justin Braun No comments

I’ve been doing lots of work in the lab lately with Exchange 2010 to understand all the new changes and how it works with the Compellent Storage Center.

With Exchange 2010, the concept of Storage Groups no longer exists.  Databases are the sole object and are a peer to the server now.  Database names must be unique, but can be moved from server to server as necessary.

In the past, I’ve shared some scripts on how to provision storage for an Exchange 2007 environment.  I’ve slightly reworked this script to account for no longer needing storage groups, but to also automatically create the mailbox database on the Exchange Server and mount it when completed.

# NAME: Exchange2010LabCreate.ps1
# DESC: PowerShell script to create and map volumes for Exchange 2010 Lab
# BY  : Justin Braun, Compellent Technologies, Inc.
# DATE: November 24, 2009
# VER : 1.0
#
# THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND.  THE ENTIRE
# RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
#
 
####################################################
# ERROR HANDLING
####################################################
    #"SilentlyContinue": do not print, continue 
    #"Continue": Print, continue (this is the default) 
    #"Stop": Halt the command or script 
    #"Inquire": Ask the user what to do 
    $ErrorActionPreference = "Inquire"
 
####################################################
# STORAGE CENTER CONFIGURATION INFORMATION
####################################################
    $schost = "storagecenter.lab.test"
    $user = "username"
    $pass = "password"
 
####################################################
# EXCHANGE STORAGE CONFIGURATION
####################################################    
    # Number of Databases Per Server
    $dbsize = "1TB"
    $dbtotal = 1
    $dbDiskFolder = "Assigned"
 
####################################################
# SERVER INFORMATION
####################################################
    # Server to Map To (server defintion on CSC must match server name in Windows because of VDS)
    $ServerName = "E2K10MBX01"
 
####################################################
# MISC. CONFIGURATION SETTINGS
####################################################
    # Volume folder name
    $SCParentFolderName = "E2K10MBX01"
    
    # Use custom disk folders for each volume? (if $false, then a single disk folder config is assumed)
    $useCustomDiskFolders = $false
    
    #Mountpoints (set to $true if mountpoint volumes weren't previously created.  Mountpoint volumes will be 1G by default)
    $createMountpointRoot = $true
    
    # Mountpoint Root
    $dbmproot = "M:\Exchange"
    $dbRootDrive = "M:"
 
##########################################################################################
##########################################################################################
# DO NOT EDIT BELOW THIS LINE !
##########################################################################################
##########################################################################################
 
 
# Creates volume with specified name and size using connection instantiated on script launch
function CreateVolume
{
    param
    (
        [string]     $VolumeName,
        [string]     $VolumeSize,
        [string]     $MPRoot,
        [string]     $SCDiskFolder,
        [bool]         $IsMountPoint
    )
 
    Write-Output "Creating new volume: $volumename..."
    if($useCustomDiskFolders -eq $true)
    {$scvolume = New-SCVolume -Name $VolumeName -Size $VolumeSize -ParentFolder $SCParentFolderName -StorageType $SCDiskFolder;}
    else
    {$scvolume = New-SCVolume -Name $VolumeName -Size $VolumeSize -ParentFolder $SCParentFolderName;}
 
    # Maps volume previously created and returned from CreateVolume function
    Write-Output "Mapping new volume $volumename to $servername..."
    
    # Map Volume (if multiple HBA ports are server will be used, make sure that MPIO is installed on server and remove -SinglePath switch from next line
    New-SCVolumeMap -VolumeIndex $scvolume.Index -ServerIndex $scserver.Index -SinglePath
 
    # Rescan Server
    Write-Output "Rescanning server for new volume..."
    Rescan-DiskDevice -Server $ServerName -RescanDelay 5
 
    # Issue Drive Letter / Mount Point
    Write-Output "Creating access path for new volume..."
    $device = Get-DiskDevice -SerialNumber $scvolume.SerialNumber
    
    # Check to see if the device is there yet after initial rescan
    if($device -eq $null)
    {
        # Device is still null, so let's perform up to 10 rescans before we move on
        $scancount = 0
        
        do
        {
            # Rescan the disk
            Write-Output "Rescanning server for new volume..."
            Rescan-DiskDevice -Server $ServerName -RescanDelay 5
            $scancount ++
            
            # Try getting the device again
            $device = Get-DiskDevice -SerialNumber $scvolume.SerialNumber
        }
        until($device -ne $null -or $scancount -eq 10)
    }
    
    # Set variable (this is only used if this is a drive letter mount)
    $finalpath = $MPRoot
    
    # Set full mountpoint path (create path if it doesn't exist)
    if($IsMountPoint -eq $true)
    {
        $finalpath = "$MPRoot\$VolumeName"
        
        # Check to make sure the full mountpoint path acutually exists, otherwise create it
        if (!(Test-Path -path "$finalpath\"))
        {
            New-Item "$finalpath\" -type directory
        }
    }
    
    Write-Output "Onlining Disk and setting access path to $finalpath..."
 
    # Finish creation of mountpoint/drive access
    Set-DiskDevice -SerialNumber $device.SerialNumber -Online
    Set-DiskDevice -SerialNumber $device.SerialNumber -ReadOnly:$false 
    $newvol = New-Volume -DeviceName $device.DeviceName -Server $ServerName -Label $VolumeName -AccessPath $finalpath
    
    # Null out device
    $device = $null
}
 
function LoadSnapins
{
    # Load Exchange Management Shell & Compellent Storage Center Snapins (if not already)
     $LoadedSnapins = Get-PSSnapin;
    $SnapinsToLoad = "Compellent.StorageCenter.Scripting", "Microsoft.Exchange.Management.PowerShell.E2010"
    
    "Adding PowerShell Snapins..."
 
    foreach($snapin in $SnapinsToLoad)
    {
        if (get-pssnapin $snapin -ea "silentlycontinue") 
        {
            write-host "$snapin is already loaded."
        }
        elseif (get-pssnapin $snapin -registered -ea "silentlycontinue") 
        {
            Add-PSSnapin $snapin
            Write-Host "$snapin is now loaded."
        }
        else 
        {
            write-host "PSSnapin $snapin not found" -foregroundcolor Red
        }
    }
}
 
#############################
# START SCRIPT
#############################
 
$started = Get-Date
 
#Load Requested Snapins
LoadSnapins
 
# Initialize Connection for Storage Center
#$pass = Read-Host -AsSecureString -Prompt "Please provide the Storage Center password for $user"
$securepass = ConvertTo-SecureString $pass -AsPlainText -Force
$connection = Get-SCConnection -HostName $schost -User $user -Password $securepass -Save $schost -Default
 
# Create new Volume Folder if it doesn't exist
$volumefolder = Get-SCVolumeFolder -Name $SCParentFolderName
if($volumefolder -eq $null)
{
    Write-Output "Creating new volume folder: $SCParentFolderName..."
    $volumefolder = New-SCVolumeFolder -Name $SCParentFolderName;
}
 
# Get server information for the server that we are mapping all of the volumes to
$scserver = Get-SCServer -Name $ServerName
 
# Create New Mount Point Volumes for database and logs (if requested)
if($createMountpointRoot -eq $true)
{
    CreateVolume "$ServerName-Exchange-MP" "1G" $dbRootDrive $dbDiskFolder $false
}
 
# Reset counters
$dbcount = 1
 
# Loop through total amount of databases for the server
do
{
    CreateVolume "$ServerName-DB$dbcount" $dbsize $dbmproot $dbDiskFolder $true
    
    "Creating mailbox database in Exchange 2010..."
    New-MailboxDatabase -Server $ServerName -Name "$ServerName-DB$dbcount" -EdbFilePath "$dbmproot\$ServerName-DB$dbcount\$ServerName-DB$dbcount.edb" -LogFolderPath "$dbmproot\$ServerName-DB$dbcount\Logs\"
    
    "Mounting new mailbox database..."
    Mount-Database -Identity "$ServerName-DB$dbcount"
    
    $dbcount ++ 
}
until($dbcount -eq $dbtotal + 1)
 
 
# Complete!
$ended = Get-Date
Write-Output "Volume Creation Complete!"
Write-Output "Started: $started"
Write-Output "Finished: $ended"
 
#############################
# END SCRIPT
#############################

There are a number of areas in which this script can be improved and that I will continue to work on. 

Exception handling is very important.  Understanding how your code could react in particular scenarios is difficult, but you don’t want your script to bomb out every time you run it either.  I’ve build quite a bit of exception handling into the mapping and mounting portions of the script, but this can always be reworked to be improved.

Categories: Compellent, Development, Exchange, PowerShell Tags: