Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.0k views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...