@H S From your description, it seems you want to create a dynamic group which contains the Windows server that belongs to class "MyAppClass". If there's any misunderstanding, please let us know.
Based on my research, I find a similar link discuss this. In this link, it provides the xml of a group based on the class containing Windows Server 2016 Computer Objects. We can read it as a reference:
Hope it can help.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.