Initialize, partition and format disks using PowerShell

I ran into this good blogpost about using PowerShell to Initialize Raw Disks, and to Partition and Format Volumes.
http://blogs.technet.com/b/heyscriptingguy/archive/2013/05/29/use-powershell-to-initialize-raw-disks-and-partition-and-format-volumes.aspx

To summarize, you can initialize raw disks and partition and format volumes using the following simple PowerShell “script”:
Get-Disk | Where partitionstyle -eq ‘raw’ | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel “disk2” -Confirm:$false