Get-VirtualDirectory cmdlets take a long time

Just a tip if you have large Exchange environment and Get-VirtualDirectory cmdlets take a long time.

You can follow KB2896472 and use the AdPropertiesOnly switch with the cmdlet which returs the virtual directory properties that are stored in Active Directory Domain Services and not in the Internet Information Services (IIS) metabase.

It works really nice.

[PS] C:\>Measure-Command -Expression {Get-WebServicesVirtualDirectory} | ft -a Milliseconds


[PS] C:\>Measure-Command -Expression {Get-WebServicesVirtualDirectory -ADPropertiesOnly} | ft -a Milliseconds


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s