Skip to content

Instantly share code, notes, and snippets.

@jetstreamin
Created July 9, 2015 17:15
Show Gist options
  • Save jetstreamin/f467c6cd9adb58036d6a to your computer and use it in GitHub Desktop.
Save jetstreamin/f467c6cd9adb58036d6a to your computer and use it in GitHub Desktop.
Passing Arguments from Batch to PowerShell
powershell -command "G:\Karan\PowerShell_Scripts\START_DEV.ps1 Dev"
and inside your script head:
$w=$args[0]
This if you want to use the built-in variable $args. Otherwise:
powershell -command "G:\Karan\PowerShell_Scripts\START_DEV.ps1 -w \"Dev\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment