title: windows equivalent of this bash command that uses /dev/urandom
body: <p>Is there a simple Windows equivalent for this bash command:</p>
  
  <pre><code>head -c 500 /dev/urandom | tr -dc abcdefghijklmnopqrstuvwxyz | head -c 9; echo
  </code></pre>
  
  <p>I think the main problem is /dev/urandom, since I've heard of the CryptoAPI, but I don't know if that's cryptographically secure enough. </p>
  
  <p>EDIT: Sorry, the code is used in a php script, and the <code>%s</code> represents a string substitution; I forgot to make that substitution when I asked the question. Fixed. </p>