After uninstalling iis, then remove the configuration files located under
C:\Windows\System32\inetsrv, this will completely uninstall iis.
More information you can refer to this link: https://stackoverflow.com/a/64060384/13336642.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.