How to pass the value of a variable from batch to powershell?
I'm trying to use the command from this link:
https://stackoverflow.com/questions/6359618/pass-parameter-from-a-batch-file-to-a-powershell-script
A string is passed in the link, but can a variable also be passed?
Command used in the batch file:
powershell.exe -executionpolicy remotesigned -File "C:\Users\%username%\Desktop\Normalize_LUFS\LUFS.ps1 %vLUF%"
Setting parameters at start of Powershell script:
$sw = $args[0]
$logMatches = Select-String -Path "C:\Users\$env:username\Desktop\Logs_LUFS\*.log" -Pattern '(?<I>^ +I:) +(?<LUFS>.+)|
(?<I>^Input Integrated:) +(?<LUFS>.+)' -List Out-File "C:\Users\$env:username\Desktop\Logs_LUFS\List.txt"
Is the $sw variable that will receive the value from the vLUF variable of the batch file?