Hi All,
I’m not able to execute PowerShell script successfully using .bat file provided by input file whereas it succeeds from PowerShell console/ISE
Error: get-content : Cannot find path ‘C:\Windows\system32\BulletinIDList.txt’ because it does not exist.
it seems script executes in ''C:\Windows\system32' context…how do I force script to look for input file in ‘current directory’? please advise…!
Below is script contents to read input from txt file,
$currentFolder = $PWD.Path
$GetBulletins = Join-Path $currentFolder “BulletinIDList.txt”
$BulletinIDList = get-content $GetBulletins
Thanks