Using the following code I should be able to access the Taxonomy Term Stores:
$site = new-object Microsoft.SharePoint.SPSite("http://localhost")
$session = new-object Microsoft.SharePoint.Taxonomy.TaxonomySession($site)
$session.TermStores.Count
Yet the TermStore count is always 0. I know I have Term Stores and Term Groups and Terms because I'm able to tag items using the terms and view them in the Term Store Management Tool. For the SPSite I have tried localhost, the actual computer name, and even the Central Admin site.
Based on my research this shouldn't be that difficult.
http://msdn.microsoft.com/en-us/library/ee574969.aspx
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.taxonomy.taxonomysession.aspx
http://geeklit.blogspot.com/2009/12/using-sharepoint-term-stores.html
http://davidfrette.wordpress.com/2010/03/31/million-terms
Can you please spot what I'm doing wrong?