CmdID / PowerShell / Cmdlets / Remove
Remove-WebVirtualDirectory
Removes an IIS virtual directory. Windows Server PowerShell reference
From the Windows Server PowerShell reference 5 parameters Its page in the reference
Parameters
-ApplicationSpecifies the name of the application that hosts the virtual directory to remove.-Confirm, -cfPrompts you for confirmation before running the cmdlet.-NameSpecifies the name of the virtual directory that this cmdlet removes.-SiteSpecifies the name of the site that hosts the virtual directory to remove.-WhatIf, -wiShows what would happen if the cmdlet runs.