Executing Powershell Commands against Exchange 2007 and Exchange 2010

The System.Management.Automation assembly allows the exeuction of Powershell commands against Exchange server.
Although, it would seem that the same code would be able to run for both of the versions of Exchange Server, two different codebases are required. The reason for this is that Exchange 2007 (SP1) supports only local Powershell, and Exchange 2010 uses remote Powershell.