This was bugging me for a while today, was trying to infer a contenttype's id using PowerShell until I noticed that it was in the URL of the content type definition. So the easiest way is to just navigate to the content type in the site content type gallery and just scrape the ID out of the URL: