我们可以允许服务名称中可以有连字符(-)吗?

问题描述 投票:0回答:1

我试图为一个用例创建服务。 经过大量 POC 之后,我了解到我们不能在服务名称中包含连字符。

链接:https://community.esri.com/t5/arcgis-online-questions/change-in-service-title-naming-limitations-rejects/m-p/1342838#M55387

我尝试使用以下命令创建服务: sc.exe 创建 rahul-kumar binpath=“C:\Windows\System32\Windows\PowerShellv1.0powershell.exe”

我能够使用连字符创建服务。

有人可以向我证实这一点吗? 非常感谢您的帮助

service
1个回答
0
投票

不可以,服务名称可以包含连字符。

问题是 powershell 可执行文件的路径不正确:

C:\Windows\System32\Windows\PowerShell\v1.0\powershell.exe

这不是 System32\Windows\PowerShell 1.0,而是 System32\WindowsPowerShell 1.0

您需要删除该服务并使用此命令创建一个新服务(powershell 的固定路径):

sc.exe create rahul-kumar binpath= "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
© www.soinside.com 2019 - 2024. All rights reserved.