Created
January 8, 2019 22:06
-
-
Save jheinrichs79/cd30fff4f8b5ffc77954033a12b92289 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I can run a single line in a powershell file and the script works correctly. | |
C:\folder\script.ps1 -inputFile "\\Server\share\script01.ps1" -outputFile "\\Server\share\file.exe" -elevated -title 'My Application' -version '1.0.0.0' | |
What I would like to do is to add some variables so that I can make the call more dynamic. Is there a way to do this? | |
C:\folder\script.ps1 -inputFile $input -outputFile $output -elevated -title $Title -version $version | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yus
Just add:
param(
[string]$inputFile,
[string]$outputFile,
[bool]$elevated = $true,
[string]$title,
[string]$version
)