Get-VirtualDirectory cmdlets take a long time to run in Exchange Server
Original KB number: 2896472
In an Exchange Server environment, you run one of the following cmdlets to obtain the properties of a virtual directory for a server in another site that's connected over a wide area network (WAN):
However, the cmdlet takes much longer than expected to run (about 15 minutes).
This issue occurs because the cmdlet makes calls to the Internet Information Services (IIS) metabase for the properties of the virtual directory.
To work around this issue, use the
AdPropertiesOnly switch with the cmdlet in the calls to the IIS metabase.
Get-OwaVirtualDirectory -Server Contoso -AdpropertiesOnly
Get-OwaVirtualDirectory -Identity "Contoso\owa (default Web site)" -AdpropertiesOnly
ADPropertiesOnly switch specifies that only the virtual directory properties that are stored in Active Directory Domain Services (AD DS) are returned.
For more information about
ADPropertiesOnly switch, see Get-OwaVirtualDirectory.