Tuesday, March 13, 2018

Active Directory PowerShell cmdlet query is timing out

If you expect your PowerShell query to return an exceptionally large results set that might take longer than 2 minutes to retrieve. You can increase the OperationTimeout on your target DC by performing the following steps:

Login to the target DC

Browse to "%Windir%\ADWS\Microsoft.ActiveDirectory.WebServices.exe.config" and edit it
Increase the "OperationTimeout" parameter value based on your needs. The default value is 2 minutes.

After that restart ADWS using the following PowerShell commands
Stop-Service ADWS
Start-Service ADWS

No comments:

Post a Comment