首页 > 解决方案 > 为什么 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

我不确定是否需要转义括号中提到的字符。

标签: powershell

解决方案


我已经从detect.project.name下面逃脱了字符串,它工作正常。

detect.project.name="[POS]' '-' 'My' 'Sample' 'Application' ('My.App') '1.0.0"


推荐阅读