If you've got an on prem instance, and can use PowerShell against it, then you should be all set. You're going to need to load the TeamFoundation snapin, and load up a pair of DLLs that should be found in your Visual Studio installation in the path 'Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer'. So, if you have those items you can do this:
Add-PSSnapin Microsoft.TeamFoundation.PowerShell
[System.Reflection.Assembly]::LoadFrom((Resolve-Path 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.Client.dll').Path)
[System.Reflection.Assembly]::LoadFrom((Resolve-Path 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Microsoft.TeamFoundation.WorkItemTracking.Client.dll').Path)
$TFS = Get-TfsServer <your TFS URL, something like 'http://MyTFSServer:8080/tfs/MyTeam'>
$WIS = $TFS.GetService([Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore])
Once you have a connection to the WorkItemStore you can post queries against it. That is basically the database that stores all your WorkItems for TFS.
$QueryText = "SELECT * FROM WorkItems WHERE [ID] = '928850' OR [ID] = '928851'"
$WorkItems = $WIS.Query($QueryText)
I hope that helps.