I have created a PowerShell script to get files from a subfolder. This executes when I run from the PowerShell console after manually entering Set-ExecutionPolicy unrestricted, but when I call the same script from a batch file
C:\Windows\System32\WindowsPowerShell\v1.0\PowerShell.exe D:\programs\abc\bin\xyz_clean.ps1
it throws an error:
xyz_clean.ps1 cannot be loaded because the execution of scripts is disabled on this system.