New Question
0

how to provide a parameter to s powershell script in userdata

asked 2015-04-17 22:24:54 +0300

celina-yang gravatar image

I tried to launch a windows stack using heat template. the userdata is powershell script created by myself . I tried: setupenv.ps1 -specificurl "http://...." setupenv.ps1 "http://....." but neither works my script is like: param([String]specificurl) (new-object System.Net.WebClient).DownloadFile($specificurl,"C:\temp")

Could you pls tell me how to pass the parameter to the script in userdata?

Thanks a lot

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2015-04-17 23:02:30 +0300

celina-yang gravatar image

I know how to do it: powershell -command "setupenv.ps1 http://...."

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2015-04-17 22:24:54 +0300

Seen: 259 times

Last updated: Apr 17 '15