感谢joey,我正在使用Jenkins的以下命令,但收到错误。
Set-ExecutionPolicy RemoteSigned
Import-Module PowerShellGet
Install-Module -Name PSApigeeEdge -Force
Import-module PSApigeeEdge
Set-EdgeConnection -org def -User xyz-EncryptedPassword abc
Deploy-EdgeApi -Name proxy-name -Environment digital-dev -Revision 25 Error: ConvertTo-SecureString : Input string was not in a correct format.
At C:\Program Files\WindowsPowerShell\Modules\PSApigeeEdge\Public\Set-EdgeConnection.ps1:97 char:35
+ $SecurePass = ConvertTo-SecureString -String $EncryptedPassw ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [ConvertTo-SecureString], FormatException
+ FullyQualifiedErrorId : System.FormatException,Microsoft.PowerShell.Commands.ConvertToSecureStringCommand
答案 0 :(得分:0)
如果您对PowerShell感到满意,可以使用另一种工具。 https://github.com/DinoChiesa/Edge-Powershell-Admin
需要导入powershell模块才能使用模块,这在jenkins中非常简单。