title: sysprep failure on Windows Server 2008
body: <p>Before deploying a Azure VM Role, we need to perform  </p>
  
  <pre><code>%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown
  </code></pre>
  
  <p>But in my case the sysprep fails with the log file %windir%\system32\sysprep\Panther\setuperr.txt saying:</p>
  
  <pre><code>2012-07-05 08:03:57, Error      [0x0f0073] SYSPRP RunExternalDlls:Not running DLLs; either the machine is in an invalid state or we couldn't update the recorded state, dwRet = 31
  2012-07-05 08:03:57, Error      [0x0f00ae] SYSPRP WinMain:Hit failure while processing sysprep cleanup external providers; hr = 0x8007001f
  </code></pre>
  
  <p>I do not always want to create a new image. Is there any work around?
  I followed the instructions in MS support <a href="http://support.microsoft.com/kb/929828" rel="nofollow">here</a> and tried:</p>
  
  <pre><code>%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:.\unattend.xml
  </code></pre>
  
  <p>It did not work.</p>
  
  <p>Under certain circumstances, I need to tear down the VM Image from azure and re-deploy with some more changes. So sysprep has to run almost twice every week.</p>