Please feel free to provide feedback or file bugs here.

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    high CPU

    Found out when my CPU is high (99%-100) (i do set executionpolicy to remotesign/unrestricted also)
    When i run the PS script, it will ask for executionpolicy.
    but when i low CPU, it will just run the script.

    suspect value (executionpolicy remotesign) unable to pass thru to script.ps1 on time. so it prompt out everytime when CPU is high.
    do we have some setting to tune this. delay it, so that executionpolicy have more time to pass the value to script.ps1.

    ---------------------------------
    Script:
    $sourcefolder="D:\A743"
    $datenow = get-date
    $processdate = (get-date).Adddays(-3)

    get-childitem $sourcefolder -file | where-object { $_.lastwritetime -le $processdate } | remove-item -force
    ---------------------------------------
    WIN2012R2 PowerShell v5.1
    --------------------------------------
    this is the message cause the automation fail.

    Execution Policy Change
    The execution policy helps protect you from scripts that you do not trust.
    Changing the execution policy might expose you to the security risks described
    in the about_Execution_Policies help topic. Do you want to change the execution
    policy?
    [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):

    Thanks you. due to the original post cant update. here i post again for all the information. Thanks

    LOW CPU = all run normal. no prompt anything abt execution policy.
    high CPU = will ask exceution policy. if automation (without GUI) will fail.

    cK shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base