## Possible Solution
<!-- Not obligatory, but suggest a fix/reason for the bug -->
The problem may be inside Remove-JiraGroupMember where Get-JiraUser is called like so:
`$userObj` = Get-JiraUser -InputObject $_user -Credential $Credential -ErrorAction Stop
in my case $_user is a string not a JiraPs.User. Inside Get-JiraUser an attempt is made to get the field
$_user.Name with no check on the type of $_user
In v2.4.4, Get-JiraUser checked the supplied user name was of type JiraPS.User
`if` ((Get-Member -InputObject $i).TypeName -eq 'JiraPS.User')
and if not, assumed calling .ToString() would yield the username
Description
Calling Remove-JiraGroupMember with valid strings for Group and User, where both group and user do exist, fails with
The exact line I'm using is as follows:
Remove-JiraGroupMember -Group "ValidGroupName" -User "ValidUserName" -Force -Credential $Credential
$Credential is a valid PSCredential
Steps To Reproduce
Run the following Powershell script where $Credential is a valid PSCredential for your JIRA server with admin rights.
Expected behavior
No error, and the user is removed from membership of the JIRA group
Your Environment
JiraPS 2.8.0 Windows 10 PSVersion 5.1 JIRA 7.5.0
Name Value
PSVersion 5.1.17134.137 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.17134.137 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1