Yes, you can. But you will also need to run the command:
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
This will re-create application mappings in IIS, and it will instruct IIS how to handle ASPX, ASMX, ASCX and other ASP.NET files.