How to run a PowerShell script from a batch file
I am trying to run this script in PowerShell. I have saved the below script as ps.ps1 on my desktop. $query = “SELECT * FROM Win32_DeviceChangeEvent WHERE EventType = 2” Register-WMIEvent -Query $query -Action { invoke-item “C:\Program Files\abc.exe”} I have made a batch script to run this PowerShell script @echo off Powershell.exe set-executionpolicy remotesigned -File … Read more