Use the Remove-AutodiscoverVirtualDirectory cmdlet to remove the Autodiscover virtual directory that is associated with the Autodiscover service on an Exchange 2007 Client Access server.
To run the Remove-AutodiscoverVirtualDirectory cmdlet, the account you use must be delegated the Exchange Server Administrator role and local Administrators group for the target server.
For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.