Remove AD group member

Hello,

Am trying to remove members from the AD group where the OS Version like 18363.

$comp = Get-ADGroupMember -Identity “TestingGroup Check” -Recursive | Get-ADComputer -Property OperatingSystemVersion | Where-Object OperatingSystemVersion -Like ‘18363’ | Select Name
foreach ($comps in $comp) {
Remove-ADGroupMember -Identity “TestingGroup Check” -Members $comps -WhatIf
}

I keep getting an error
Remove-ADGroupMember : Cannot bind parameter ‘Members’. Cannot create object of type “Microsoft.ActiveDirectory.Management.ADPrincipal”.

Any help please

Please, when you post code or sample data or console output please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance

Since Remove-ADGroupMember takes an array of objects you don’t need a loop. But you should not limit the objects you provide to the name.
This should be all you need actually:

$ComputerList = Get-ADGroupMember -Identity 'TestingGroup Check' -Recursive | 
    Get-ADComputer -Property OperatingSystemVersion | 
        Where-Object OperatingSystemVersion -Like '18363'
Remove-ADGroupMember -Identity 'TestingGroup Check' -Members $ComputerList -WhatIf

When you use the comparison operator -like you should provide a string containing an asterisk (*). Otherwise you should use -eq instead when you want to check for an exect match.