Did you found a solution for it? I have the same problem :(
WIN11 GPO logon/logoff script doesn't trigger (but works with double click?)
Hey.
On Win10 everything works smoothly but on WIN11 my skripts doesn't work anymore.
I've installed GPO on WIN11 Home Edition.
GPO: Userconfiguration- windows - scripts - startup/Logon: (both folders i tried)
The script contains
"C:\Program Files\wol.exe" 00-xx-xx-xx-xx-xx
I've tried "scripts" and "powershell-skripts".
When I'm putting the file into: "C:\Users\xxxx\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
it works... also with double click... but not in the GPO?
I've tried also a short skript with an echo message, but nothing will triggerd. When I'm shutting down neither by logoff..
I also have an script for shutdown... same thing
Has anyone an idee what I can try now?
Thanks for you help
Windows for business | Windows Client for IT Pros | User experience | Other
3 answers
Sort by: Most helpful
-
-
med 1 Reputation point
2022-04-08T05:08:05.427+00:00 Thanks for you reply... unfortunately, theenviroment variables were set
and the change of the execution policy didn't changed anything :(
Very strange... I also tried a powershell script (because you can set in the gpo setting both)... when I'm double click the file it works fine... but on start up nothing
thanks for you help
i appreciate it -
Limitless Technology 40,076 Reputation points2022-04-06T10:55:33.783+00:00 Hi @med
Please check if $env:PSModulePath contains C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules.
If not, add them to the system variable "PSModulePath" in Environment Variables in the System Properties window.
Also, it could be PowerShell's default security level, which (IIRC) will only run signed scripts.
Try typing this:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
That will tell PowerShell to allow local (that is, on a local drive) unsigned scripts to run. Then try executing your script again.
I hope this answers your question.
Thanks.
--
--If the reply is helpful, please Upvote and Accept as answer--