0
"7-set-up-default" : {
"command" : { "Fn::Join" : ["", [
"robocopy /move C:\\inetpub\\wwwroot\\ C:\\inetpub\\wwwroot\\Default\\\n",
"powershell \"Import-Module WebAdministration;",
"Set-ItemProperty 'IIS:\\Sites\\Default Web Site' -name physicalpath -value 'C:\\inetpub\\wwwroot\\Default\\'\""
]]},
"waitAfterCompletion" : "0"
},
與此不那麼有用的堆棧跟蹤失敗:
Error encountered during build of config: Command 07-set-up-default failed
Traceback (most recent call last):
File "cfnbootstrap\construction.pyc", line 513, in run_config
File "cfnbootstrap\construction.pyc", line 125, in run_commands
File "cfnbootstrap\command_tool.pyc", line 113, in apply
ToolError: Command 07-set-up-default failed
2013-08-18 08:35:29,611 [ERROR] Unhandled exception during build: Command 07-set-up-default failed
Traceback (most recent call last):
File "cfn-init", line 122, in <module>
File "cfnbootstrap\construction.pyc", line 117, in build
File "cfnbootstrap\construction.pyc", line 502, in build
File "cfnbootstrap\construction.pyc", line 513, in run_config
File "cfnbootstrap\construction.pyc", line 125, in run_commands
File "cfnbootstrap\command_tool.pyc", line 113, in apply
ToolError: Command 07-set-up-default failed
然而,直接粘貼我的命令進入一個CMD窗口工作正常:
robocopy /move C:\inetpub\wwwroot\ C:\inetpub\wwwroot\Default\
powershell "Import-Module WebAdministration;Set-ItemProperty 'IIS:\Sites\Default Web Site' -name physicalpath -value 'C:\inetpub\wwwroot\Default\'"
誰能幫忙?