@ECHO off $BIOS= Get-WmiObject -computername \"BAHRIATSG2-PC\" -Namespace root/hp/instrumentedBIOS -Class HP_BIOSSettingInterface $BIOS.SetBIOSSetting(\'Setup Passwor
powershell has its own script file type, extension is .ps1
Save your code to a .ps1 file, and run it from a batch file with:
powershell xxx.ps1