You will also receive a similar error using the Exchange Management Shell running the following command:
An IIS directory entry couldn't be created. The error message is Access is denied.
. HResult = -2147024891
+ CategoryInfo : NotInstalled: (MB2\Exchange (Default Web Site):ADObjectId) [Get-OwaVirtualDirectory], II
+ FullyQualifiedErrorId : 401839E9,Microsoft.Exchange.Management.SystemConfigurationTasks.GetOwaVirtualDirectory
Make sure that that the "Microsoft Exchange Security Groups\ Exchange Trusted Subsystem" group is a member of local admin group of all Exchange 2007 servers. If it is not add it.
You may need to reboot all the Exchange 2010 servers in the organization, but restarting IIS on all Exchange 2010 servers worked for me