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 have a script on my domain stored on the Active Directory server. every machine on the domain has a task that when fired, calls this script to run.

Running the task from the AD server works. Running the task from another machine doesn't work. However, running the command that is triggered from cmd manually on the remote computer works?

Could anyone shine some light on this. Basically I call it like this so that the trigger is set up like...

Action: PowerShell.exe

Arguments: -noprofile –ExecutionPolicy Bypass -File "\<>NameOfADServer<>C$Tasksscript.ps1" "Argument 1" "Argument 2"

See Question&Answers more detail:os

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

1 Answer

Running as SYSTEM is probably your issue - it wont have any access outside of the PC its running on.

When you run it manually youll have the access.


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