Hi @Zring Abdulrazzaq Rasool ,
to add and remove users to and from on-premises Active Directory you can use these cmdlets in your script:
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten