PowerShell script not running


  • I've got a GPO which is applied to all of our users and I recently configured a PowerShell script in it to run at logon and logoff. On the vast majority it runs without issue but on some it's not running at all. When I look at the gp results there is no logon/logoff script specified and in particular I notice that the scripts CSE last processed time seems to be a significant time in the past.

    Client machines at Win7 SP1 with PS 3. Does anyone have any thoughts?

    Wednesday, May 6, 2015 4:06 AM

All replies

  • > When I look at the gp results there is no logon/logoff script specified
    "gpupdate /target:user" - what does it tell in the console output?
    "gpresult /h report.html && report.html" - what does it tell about
    applied and denied GPOs?

    Greetings/Grüße, Martin

    Mal ein gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me - coke bottle design refreshment (-:
    Wednesday, May 6, 2015 10:59 AM
  • Hi Daniel,

    How is it going? Did we follow the suggestions provided by Martin to troubleshoot the issue? Did we allow to run PowerShell scripts on these machines? Here, to do this, we can enable the following policy setting and select proper option: Computer Configuration\Administrative Templates\Windows Components\Windows PowerShell\Turn on Script Execution.

    If the issue persists or you need further help, please don't hesitate to let us know.

    Best regards,
    Frank Shen


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact

    Wednesday, May 13, 2015 8:48 AM
  • Rather than running the script using the dedicated Powershell section of the scripts item in group policy I'm using the more generic scripts section to specify the script using:

    filename: powershell.exe

    parameters: -file file.ps1

    I just want to test if doing this resolves the issue first as I've read elsewhere that if a machine has an incorrect file association for the ps1 extension then powershell scripts specified in group policy may not run.

    I'll keep you posted.

    Wednesday, May 13, 2015 12:08 PM