powershell - 为什么 PowerShell 会抛出错误“术语 'My.App' 未被识别为 cmdlet 的名称”
问题描述
下面是脚本:
powershell "[Net.ServicePointManager]::SecurityProtocol = 'tls'; irm https://sample.website.com/detect.ps1?$(Get-Random) | iex; detect" --website.url=https://company.software.com --website.api.token=somestring== --detect.project.name="[POS] - My Sample Application (My.App) 1.0.0" --detect.project.version.name="1.1.1.1" --website.trust.cert=true --website.proxy.host=proxy.company.com --website.proxy.port=8080 --detect.detector.search.depth=10 --detect.project.user.group=WebApplication
我不确定是否需要转义括号中提到的字符。
解决方案
我已经从detect.project.name
下面逃脱了字符串,它工作正常。
detect.project.name="[POS]' '-' 'My' 'Sample' 'Application' ('My.App') '1.0.0"
推荐阅读
- scala - Scala 编译错误“最大值不是 Int 的成员”
- javascript - 将 JSON 键定义为变量中的字符串。然后无法访问给出未定义错误的 JSON 对象
- r - 从训练有素的插入符号模型中提取 beta 值
- javascript - 如何使用ajax上传文件?
- terminal - 如何在应用程序结束时恢复 VT100 DEC 私有模式?
- drupal - Drupal 7 当用户更新配置中的任何字段时调用哪个钩子
- c# - Controller 和 ControllerBase 之间的模型绑定行为与 [ApiController] 不同
- python - 具有三个函数的 Python 类
- r - R中的联合分析
- php - 如何显示存储在wordpress插件中类成员函数内声明和定义的变量中的值