PS C:\Users\dimon\src\panama\Panama> Set-AzureDeployment -Config -ServiceName pms-dimon -Slot "Production" -Configuration .\ServiceConfiguration.Test.cscfg -Verbose
Set-AzureDeployment : Could not find a part of the path 'C:\Users\dimon\ServiceConfiguration.Test.cscfg'.
At line:1 char:1
+ Set-AzureDeployment -Config -ServiceName pms-dimon -Slot "Production" -Configur ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-AzureDeployment], DirectoryNotFoundException
+ FullyQualifiedErrorId : System.IO.DirectoryNotFoundException,Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices.SetAzureDeploymentCommand
与其在当前目录中查找ServiceConfigiration.Test.cscfg
文件,Set-AzureDeployment
期望在当前用户的主目录中找到该文件,这实际上相当麻烦。
是否有一些常见的PowerShell模式可以从主目录运行所有的cmdlet函数?为什么?
-Configuration
如何处理那个字符串数据。它接受一个字符串,但是它正在尝试进行某种翻译。Resolve-Path
可能是一个解决方法,但我对-Configuration
参数的定义及其数据验证很感兴趣。 - Matt