title: How to end sessions on IIS server
body: <p>I'm using jenkins to pull servers from the load balancer, perform a code push against the server and place it back on the load balancer.  </p>
  
  <p>We now have functionality on the session end event which writes back to the database so I can't perform an IISReset because that will kill the sessions and it doesn't hit the session end event.  So we need to wait 20 minutes for all the sessions to timeout (its a setting in the application pool) so that all those sessions write back to the database. </p>
  
  <p>Is there a way using windows powershell to tell iis to close out all the iis sessions?</p>
  
  <p>This way I can perform a build on it and put it back onto the load balancer without having to wait.</p>
  
  <p>Thank you in advance, 
  Tim</p>