To properly decommission a server and remove the WAP role from the machine itself, follow these steps:

Set-WebApplicationProxyConfiguration -ConnectedServersName "://domain.com" Use code with caution. Copied to clipboard

Alternatively, use PowerShell: Uninstall-WindowsFeature Web-Application-Proxy,CMAK,RSAT-RemoteAccess .