@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:
https://social.technet.microsoft.com/Forums/en-US/82a64b72-3594-43e2-9cb9-4f2dcddd96bd/scom-2016-create-a-dynamic-group?forum=operationsmanagerauthoring
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.