Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

active directory - PowerShell Import-Module ActiveDirectory Takes 15+ Seconds to Load

I am using ScriptRunner to run a script to Get-ADUser data. In the beginning of the script, I am running Import-Module ActiveDirectory. When run as NT AuthoritySystem using PSExec on the ScriptRunner server (same as where ScriptRunner runs), it imports the module in .04 seconds, however when run via ScriptRunners process, it takes 16-18 seconds. The server does not have access to the internet or a proxy file leveraged. I have tried the ADSI route with the same issue. They suggested that it is an OCSP issue, but we do have an internal OCSP Responder, I just don't know how to point an Import-Module command for ActiveDirectory to use it. Any help/assistance would be greatly appreciated!

I have attempted to import other modules and they do not have this issue of adding considerable time to the script as ActiveDirectory does.

question from:https://stackoverflow.com/questions/65909772/powershell-import-module-activedirectory-takes-15-seconds-to-load

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...