title: How to check-in the file in TFS which is checked out for edit with its check-in requirement
body: <p>Below is the code which checks out a file from TFS and after it gets checked out, an updated file is copied at local path which I need to check-in to TFS. While checking in, I need to add the value in WorkItem by ID option present under Related Work Items heading and also the comments and other options.</p>
  
  <pre><code> $TFSCheckoutExe="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\TF.exe"
      #File to be checked-out in TFS
      $TFSFilePath="$/Intell/Installscript/Utility Scripts/powershells/DI_UTC_Test.PS1"
  
      #This file needs to be checked-in in TFS after some changes are done.
      $Localfilepath="C:\Intell\Installscript\Utility Scripts\powershells\DI_UTC_Test.PS1"
  
      $demo="C:\demo\files to check in"
  
      #Checking out file
      &amp;$TFSCheckoutExe checkout $TFSFilePath | Out-Null 
  
      #Copying the updated file to the mapped path of the file checked out.
      Copy-Item -path $demo -Destination "$Localfilepath" -Force
  
      #How to Checkin the copied file in TFS
      $ItemPath = "C:\Intell\Installscript\Utility Scripts\powershells\DI_UTC_Test.PS1"
  
  
      #Checkin the file by passing the required details which are require for checkin in any file.
      $null = &amp; $TFSCheckoutExe checkin $Itempath /comment:"Added POC file" /notes:"Code reviewer=None ; Unit Testing=N/A ; Build Details=N/A" /Related Work Items:"Add Work Item by ID=86165"
  </code></pre>
  
  <p>The above code is giving error at last line for "/Related Work Items:"Add Work Item by ID=81165" which I want to add while checking in, which is nothing but the PBI number.</p>
  
  <p>Below is the error which occurs while executing the script:</p>
  
  <pre><code>    TF.exe : TF10139: The following check-in policies have not been satisfied:
  At C:\Demo\powershell scripts\demo1.ps1:17 char:9
  + $null = &amp; $TFSCheckoutExe checkin $Itempath /comment:"Added POC file" /notes:"Co ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (TF10139: The fo...been satisfied::String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
  
    You must associate this check-in with one or more work items.
  </code></pre>