New Question

Revision history [back]

click to hide/show revision 1
initial version

parse error for the parameters in powershell script

I have one script which accepts two parameters: param([string] $urlsrc,[string]dest)

But when I try to launch the windows VM using heat template, cloudbase-init.log reported: executeuserdatascript C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\plugins\windows\userdatautils.py:58 2015-04-27 13:53:19.530 1788 DEBUG cloudbaseinit.plugins.windows.userdatautils [-] Userdata stderr: Parameter declarations are a comma-separated list of variable names with option

al initializer expressions.

At line:2 char:10

  • [String] <<<< ,

    • CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordEx

    ception

    • FullyQualifiedErrorId : InvalidFunctionParameter

    executeuserdata_script C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\Python27\lib\site-packages\cloudbaseinit\plugins\windows\userdatautils.py:59 2015-04-27 13:53:19.546 17

I can run the script successfully from powershell command prompt. Could you pls tell me how to fix it? Thanks a lot