Unfortunately, you can not do this using tf.exe
command line. If you need to use the -noprompt
parameter for automation then you're likely out of luck.
Without -noprompt
parameter, simply do this in work-item bar from UI. Select the workitem from your query and check the √, finally check in changes.

If this is a checkin policy in your company, you could also use the override parameter to bypass it as a workaround.
tf.exe checkin c:\workSpaceFilepath /comment:"some comment" /override:"Automated Build Process"
More details please take a look at this similar question: Can I check in to TFS from CLI with a work item association?
Update
tf checkin -associate
May do the trick as KlingonJoe says. However - associate
is out of date
This may work with earlier version of TFS\VS such as VS2010 or team explorer everywhere. But it's not work for TFS2015 and VS2013 and above at least.
Moreover, to ignore the prompt, you could directly use /noprompt
in your tf check in command. More info you could check this tutorial.