title: Wait-Process not working in Windows 10
body: <p>I have a .ps1 script for installing a piece of software with Wait-Process that was created with ISE on a W7 machine that when I try to run it on W10, it errors out.  Here is the script up until failure:</p>
  
  <pre><code>#Runs EnterpriseRx installer configured for PROD:
  .\"EnterpriseRx.exe" /q /installType=0 /facilityID=999 /targetEnv=PROD 
  /encryptFacility=0 /S /D=C:\McKesson\EnterpriseRx Production
  
  #15 second notification letting user know install is running:
  $wshell = New-Object -ComObject Wscript.Shell
  $wshell.Popup("This process typically takes about 1 minute.  You will be 
  notified when install is complete.",15,"EnterpriseRx - PROD is 
  installing...",0x1)
  
  #Wait for application to finish installing:
  Wait-Process -name "EnterpriseRx.exe"
  </code></pre>
  
  <p>The error returned is this:</p>
  
  <pre><code>Wait-Process : Cannot find a process with the name "EnterpriseRx.exe". 
  Verify the process name and call the cmdlet again.
  At C:\temp\EnterpriseRx Install TEST\EnterpriseRx Production - Desktop.ps1:9 
  char:1
  + Wait-Process -name "EnterpriseRx.exe"
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : ObjectNotFound: (EnterpriseRx.exe:String) [Wait-
  Process], ProcessCommandException
  + FullyQualifiedErrorId : 
  NoProcessFoundForGivenName,Microsoft.PowerShell.Commands.WaitProcessCommand
  </code></pre>
  
  <p>I've tried changing the name to match what is showing in Task Manager, but with no success; I get the same error message.  Note: This process is a run-on-command.exe, I don't need to verify <em>if</em> it's running, I know it is running, I just need to know what it's running <em>as</em>.</p>
  
  <p>Any ideas or suggestions?</p>