title: Is there a lock statement in PowerShell
body: <p>When using threads in PowerShell, are we able to use the <code>lock</code> statement like in C#?</p>
  <p>Or do we need to use the code that <code>lock</code> gets pre compiled to, ie. use the <code>Monitor</code> class?</p>