Hi,
OCTOPUS VERSION = 3.3.24
I have a nuget package that holds database bapacs and powershell scripts that restore the database to an azure instance. However, the following command raises an error in octopus, the same script runs with no errors from the powershell command shell.
command that causes error:
$sqlpassword = ConvertTo-SecureString ‘YFlBoS7yYXXXXXXXXXXXXXXXXSxqKE96rcqGI4u0LqflPg8mEPgl67DiBr7J9M’ -AsPlainText –Force
Error:
ConvertTo-SecureString : Cannot convert ‘System.String’ to the type
’System.Management.Automation.SwitchParameter’ required by parameter ‘Force’.
At C:\Octopus\Work\20160804112813-79\DrugUpdate-SetupSourceData.ps1:12 char:118
- … cOhAlKTMxIBSxqKE96rcqGI4u0LqflPg8mEPgl67DiBr7J9M’ -AsPlainText ?Force
-
~~~~~~
- CategoryInfo : InvalidArgument: ( [ConvertTo-SecureString], P
arentContainsErrorRecordException - FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Comma
nds.ConvertToSecureStringCommand
- CategoryInfo : InvalidArgument: ( [ConvertTo-SecureString], P
The remote script failed with exit code 1
Need help.