July 31, 2015

SCVMM - Powershel - Checkpoints Size

Virtual Machine Manager Command Shell has great cmdlet Get-SCVMCheckpoint. It allows to see snapshots across your Hyper-V hosts that managed via VMM. I noticed one limitation of that cmdlet. It actually doesn't show size of checkpoints. I looked into cmdlets available in Command Shell and noticed Get-SCVirtualHardDisk command that has size information I need.

Here is PowerShell script that combines two cmdlets (Get-SCVirtualMachine and Get-SCVirtualHardDisk) to search all virtual machines with *.avhd* drive. It includes VMName and VirtualMachineState properties from Get-SCVirtualMachine part. Hostname, Location of AVHD* file and Size are populated from Get-SCVirtualHardDisk part. Results are sorted by Size and default Bytes expression converted to Megabytes.

Get-SCVirtualMachine | foreach {$VMName = $_.name; $VirtualMachineState = $_.VirtualMachineState; Get-SCVirtualHardDisk -VM $_.name | where {$_.Location -like "*.avhd*"} | select @{Name='VMName'; Expression={[String]::join(";", $VMName)}},@{Name='VirtualMachineState'; Expression={[String]::join(";", $VirtualMachineState)}},HostName,Location,@{"Name"="Size (MB)"; "Expression"={[int]($_.Size/1MB)}}} | sort "Size (MB)" -Descending | ft -AutoSize

Results can be exported to CSV file by adding " | export-csv filename.csv" at the end of script (instead "| ft -AutoSize").

If you need to quickly calculate results and see an output you can use measure function "| measure "Size (MB)" -Ave -Sum -Max -Min" at the end of script (instead of " | sort "Size (MB)" -Descending | ft -AutoSize").

July 28, 2015

Migration to Exchange online scenarios

In this blog post I will describe migration scenarios to Exchange Online. Exchange Hybrid deployment will not be highlighted  because it deserves another huge post. I will walk through Staged, Cutover and IMAP migrations. Main requirements, considerations, restrictions and usage. This post will help to determine preferable way for migration to Exchange Online. It covers scenarios when organization decided to move to cloud completely, decommission current on-premise email platform and be independent from any local datacenter outages. When any worker can just grab their corporate laptop and continue working with business critical stuff whatever he wants.

Lets begin from Staged Exchange Migration. This type of migration is suitable for organizations with Exchange 2003 or 2007 only. Some restriction of Staged Migrations is that Out of Office messages are not migrated and user has to configure it again after migration. All resource and user mailboxes are migrated by migration process. Distribution groups, contacts and mail enabled-users are synchronized by Directory Synchronization process. Microsoft Azure Active Directory Sync tool is used for that purpose. Here is small summary of Staged Migration:
Type: Staged Exchange migration
Usage: Migrate all mailboxes to Exchange Online, few weeks or months migration
Requirements: Exchange 2003/2007 only, directory synchronization tool
Restrictions: Out of Office is not migrated, user/resource mailboxes migrated, DL's, contacts etc. are migrated through sync process
Microsoft advice: Scenario for less than 2000 mailboxes
If we are talking about Cutover Exchange Migration it worth to mention that this type of migration is suitable for organizations with Exchange from 2003 to 2013. It is good example if you have an Exchange 2013 and want  to migrate to Exchange Online completely in a short time. Summary for Cutover Migration:
Type: Cutover Exchange migrations
Usage: Migrate all mailboxes to Exchange Online, few days or weeks migration
Requirements: Exchange 2003/2007/2010/2013
Restrictions: WindowsEmailAddress attribute is a key attribute
Microsoft advice: Less than 2000 mailboxes scenario
Note: Address book is used to identify the mailboxes, distribution groups and contacts for migration; every 24 hours incremental synchronization
For small and medium-sized organizations there is IMAP migration. This type is good decision for organization who used hosted email service providers. If your organization has Exchange 2000 or earlier IMAP migration is your choice. Here is summary as well:
Type: IMAP migration
Usage: Small and medium-sized organizations, migration from hosted service providers
Requirements: Exchange 2000 or earlier versions, Non-Exchange on-premise systems, manual mailbox provisioning
Restrictions: Mailbox migration only; Contacts, Calendar Items, tasks etc. are not migrated
Note: every 24 hours incremental synchronization to Exchange Online
This is quick blog post with no deep technical details that I hope will help you to choose right direction.

July 8, 2015

Hyper-V - Virtual Disk Conversion

# Convert VHD to VHDX
Convert-VHD –Path C:\Folder\Source.vhd –DestinationPath C:\Folder\Destination.vhdx

# Convert VHDX to VHD
Convert-VHD –Path C:\Folder\Source.vhdx –DestinationPath C:\Folder\Destination.vhd

# Convert VHDX to VHD differencing
Convert-VHD –Path C:\Folder\Source.vhdx –DestinationPath C:\Folder\Destination.vhd –VHDType Differencing –ParentPath C:\Folder\Parent.vhd

# Convert VHDX to VHDX fixed
Convert-VHD –Path C:\Folder\Source.vhdx –DestinationPath C:\Folder\Destination.vhdx –VHDType Fixed

Source: Convert-VHD