That should be associated with this dll:
C:\Program Files (x86)\Microsoft Visual Studio
11.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Client.dll
It should be in a similar location for VS 2010. One solution would be to use Add-Type to load it to the current session:
Add-Type -Path "$FilePath\Microsoft.TeamFoundation.Client.dll"
This solution may be preferable because your script will always check for that dll and it shouldn't break across environments. Your description of the problem makes it sound like the script is very dependent upon your environment, and relied on PowerGUI to execute correctly.
Depending on the version of the powershell console you're running, this question offers more suggestions for running assemblies from different versions of .NET. Your version of the Powershell console may have been compiled against a different version of .NET than the dll, and if that is the case you'll have to go to that question and follow the procedure to create a config file to make your console work with other versions of .NET. I would recommend using this answer as your example.