无法处理输入
问题描述:
$physicalPath = 'C:\Projects\Foo'
& cmd /c C:\windows\System32\inetsrv\appcmd set vdir 'Default Web Site/' -physicalPath:$physicalPath
Error: "Failed to process input: The Parameter 'C:\Projects\Foo' must begin with a \ or -"无法处理输入
缺少什么我在这里?
答
$physicalPath = 'C:\Projects\Foo'
$defaultsite = 'Default Web Site/'
start-process cmd.exe -ArgumentList "/c C:\windows\System32\inetsrv\appcmd set vdir $defaultsite /physicalPath:$physicalPath"
我不知道你在哪里,你是不是真的使用命令来获取参数集让你physicalpath参数,这可能会帮助你。