cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a securestring?

sas81
Not applicable

Hi,

Is it possible to edit the password for logon account in BE?

I am trying following command, but get the error:

BEMCLI> Get-BELogonAccount "administrator" |Set-BELogonAccount -NewPassword 'p'
 

Set-BELogonAccount : Cannot bind parameter 'NewPassword'. Cannot convert the "p
" value of type "System.String" to type "System.Security.SecureString".
At line:1 char:68
+ Get-BELogonAccount "administrator" |Set-BELogonAccount -NewPassword <<<<  'p'
    + CategoryInfo          : InvalidArgument: (:) [Set-BELogonAccount], Param
   eterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,BackupExec.Manage
   ment.CLI.Commands.SetBELogonAccountCommand

How to use 'SecureString'?

Regards,

1 ACCEPTED SOLUTION

Accepted Solutions

pkh
Moderator
Moderator
   VIP    Certified

This is more a Powershell question rather than a BE question.

There are two methods to getting a secure string in Powershell.

1) If you are using the console, key in

$a = read-host -assecurestring

Hit enter and then enter the string that you want to convert to a secure string.

 

2) If you are using a script, then use

$a = ConvertTo-SecureString -AsPlainText -Force -String "p"

 

Then your BEMCLI command is 

Get-BELogonAccount "administrator" | Set-BELogonAccount -NewPassword $a

 

 

View solution in original post

2 REPLIES 2

pkh
Moderator
Moderator
   VIP    Certified

This is more a Powershell question rather than a BE question.

There are two methods to getting a secure string in Powershell.

1) If you are using the console, key in

$a = read-host -assecurestring

Hit enter and then enter the string that you want to convert to a secure string.

 

2) If you are using a script, then use

$a = ConvertTo-SecureString -AsPlainText -Force -String "p"

 

Then your BEMCLI command is 

Get-BELogonAccount "administrator" | Set-BELogonAccount -NewPassword $a

 

 

AmolB
Moderator
Moderator
Employee Accredited Certified

I am guessing, by Edit you mean to say reset password.

If the above is true than Open up BEutility, right-click your server name and choose the option to

change the service account details.