title: How to run a PowerShell script from a batch file
body: <p>I am trying to run this script in PowerShell. I have saved the below script as <code>ps.ps1</code> on my desktop.</p>
  
  <pre><code>$query = "SELECT * FROM Win32_DeviceChangeEvent WHERE EventType = 2"
  Register-WMIEvent -Query $query -Action { invoke-item "C:\Program Files\abc.exe"}
  </code></pre>
  
  <p>I have made a batch script to run this PowerShell script</p>
  
  <pre><code>@echo off
  Powershell.exe set-executionpolicy remotesigned -File  C:\Users\SE\Desktop\ps.ps1
  pause
  </code></pre>
  
  <p>But I am getting this error:</p>
  
  <p><img src="https://i.stack.imgur.com/i2473.png" alt="Enter image description here"></p>