POWERSHELL command, we can execute a 1-line command directly from a batch script, without any temporary file.
Here’s the syntax.
powershell.exe -Command <yourPowershellCommandHere>
You may also want to include other flags, like
-Nologo to improve the actual outcome.
if you want to reproduce, please indicate the source:
batch-file – Batch files and Powershell hybrids – Use POWERSHELL Command To Execute 1-line Powershell Command - CodeDay