Automatic removal of ADSMachines from an ADSGroup

I have design one custom request form on the IT shop where a user will provide hostname of his/her domain joined machine and custom process will add that machine in one Active Directory group. This is working perfectly fine!

Now I have to create a custom script to remove those ADSmachines from this group for which respective IT shop request is either aborted or unsubscribed. I am facing challenge in finding a way to do it, this might work if I delete respective row from ADSMachineinADSgroup but I am not sure how to do it via script?

On side note, this script will be executed on daily basis to check if any IT shop request has been aborted or unsubscribed today and remove that machine from this group (since there is no OOB support for ADSMachine IT shop request so had to do the workaround to ensure compliance)

I am using Identity Manager version 8.0.2

Best regards,