title: How can I use PowerShell to update build qualities on previous TFS Builds?
body: <p>We are using TFSDeployer to listen to build quality changes and deploy to our staging environment when it transitions to "Staging".</p>
  
  <p>I'd like to have it go ahead and update all of the other builds that have a currently build quality of "Staging" to be "Rejected".</p>
  
  <p>This appears to be something that needs to happen inside the PowerShell script which looks like:</p>
  
  <pre><code>$droplocation = $TfsDeployerBuildData.DropLocation
  ECHO $droplocation
  
  $websourcepath = $droplocation + "\Release\_PublishedWebsites\CS.Public.WebApplication\"
  $webdestinationpath = "\\vmwebstg\WebRoot\CreditSolutions\"
  
  new-item -force -path $webdestinationpath -itemtype "directory"
  get-childitem $webdestinationpath | remove-item -force -recurse
  get-childitem $websourcepath | copy-item -force -recurse -destination $webdestinationpath
  
  $configFile = $webdestinationpath + "web.development.config"
  remove-item $configFile -force
  
  $configFile = $webdestinationpath + "web.staging.config"
  $configFileDest = $webdestinationpath + "web.config"
  move-item $configFile $configFileDest -force
  </code></pre>
  
  <p>So, how can I do this?</p>