Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke-JiraMethod - Add-Member : Cannot add a member with the name "toString" because a member with that name already exists. #495

Open
hkelley opened this issue Jan 2, 2024 · 0 comments

Comments

@hkelley
Copy link

hkelley commented Jan 2, 2024

Description

When using Invoke-JiraMethod -URI $uri with PSVersion 5.1, the following error is thrown:

Add-Member : Cannot add a member with the name "toString" because a member with that name already exists. To overwrite the member anyway, add the Force parameter to your command.

This seems to correspond to this line:

$returnObject | Add-Member Noteproperty $key $pairObjectValue

Steps To Reproduce

  1. Run this cmdlet
`Invoke-JiraMethod -URI $uri `

Expected behavior

No warning messages

Screenshots

image

Your Environment

Get-Module JiraPS -ListAvailable | Select Name, Version
$PSVersionTable

Name                      Version
----                      -------
JiraPS                    2.14.7 
JiraPS                    2.14.6 
PSVersion                        
PSEdition                        
PSCompatibleVersions             
BuildVersion                     
CLRVersion                       
WSManStackVersion                
PSRemotingProtocolVersion        
SerializationVersion       

Possible Solution

Add the -force option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant