dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
603 stars 279 forks source link

Invoke-ChangeIdracUserPasswordREDFISH - New-Object : Exception calling ".ctor" with .... #297

Closed wojzag closed 5 months ago

wojzag commented 5 months ago

After executing the command: Invoke-ChangeIdracUserPasswordREDFISH -idrac_ip 10.17.129.242 -idrac_user_id 4 -idrac_new_password Test1234!

I get the following message:

New-Object : Exception calling ".ctor" with "2" argument(s): "Cannot process argument because the value of argument "us erName" is not valid. Change the value of the "userName" argument and run the operation again." At C:\Program Files\WindowsPowerShell\Modules\IdracRedfishSupport\5.0.0\IdracRedfishSupport.psm1:34426 char:15

The script generates an error but the user's password is changed.

Woj.Zag

texroemer commented 5 months ago

Hi @wojzag

Can you share what iDRAC version you're currently using? I just tried the cmdlet on iDRAC9 7.10.30 and unable to repro the issue.

Thanks Tex

wojzag commented 5 months ago

Hi @texroemer

iDRAC9 Firmware Version: 7.10.30.00

$PSVersionTable.PSVersion Major Minor Build Revision 5 1 19041 4170

Woj.Zag

texroemer commented 5 months ago

Thanks. Can you update to latest cmdlet and try again.

PS C:\> Invoke-ChangeIdracUserPasswordREDFISH -idrac_ip 192.168.0.120 -idrac_user_id 3 -idrac_new_password Test1234!

- INFO, executing PATCH command to change iDRAC user password

- PASS, statuscode 200 returned successfully for PATCH command to change iDRAC user password

PS C:\> Get-Command -Name Invoke-ChangeIdracUserPasswordREDFISH

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Invoke-ChangeIdracUserPasswordREDFISH              22.17.0.0  IdracRedfishSupport

PS C:\>
wojzag commented 5 months ago

I had an old version of IdracRedfishSupport installed. After updating to the latest version, the error does not occur. Thank you for your help.

texroemer commented 5 months ago

@wojzag

Good to hear latest cmdlet version does not have this issue.

Thanks Tex