Skip to main content

All Questions

0 votes
2 answers
1k views

How do I pass an argument from Windows Batch to single Powershell Command?

I know I can pass variables to a powershell script like this: powershell -file ".\filetorun.ps1" "arg1" "arg2" and put param(var1=args[0],var2=args[1]) in the Powershell ...
HTWingNut's user avatar
  • 509
0 votes
2 answers
638 views

Erased System Path Variables

I was writing a batch file that was supposed to automatically set up a computer to receive "psexec" remote commads. Unluckly i didn't really pay attention to what i was writing and i wrote ...
Xcode's user avatar
  • 1
4 votes
1 answer
5k views

How do I set the environment variable from a batch file in PowerShell?

I need to set the environment variable from a batch file. In Linux, I could use this: source key.sh How do I do this in PowerShell? When I ran key.bat, it gave an error. I ran .\key.bat and it set ...
Chloe's user avatar
  • 6,036