starb-job from start-skript bypassing the elevation

Welcome Forums General PowerShell Q&A starb-job from start-skript bypassing the elevation

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 5 months ago.

  • Author
  • #86848

    Topics: 1
    Replies: 0
    Points: 0
    Rank: Member


    I wrote a Start-Script to measure the size of the local usersprofiles via GPO [Computerkonfiguration>Richtlinien>Administrative Vorlagen>Windows Komponenten/Windows Powershell]from the system-User which works fine!
    But it takes very much time because the logon process continues at first when the PS-Script ist finished -> so the user gets impatient. I am trying to run the Skript as a backgroundjob via start-job. But my Execution-Policy forbids my execution.

    Scope ExecutionPolicy
    —– —————
    MachinePolicy Unrestricted
    UserPolicy Undefined
    Process Undefined
    CurrentUser Undefined
    LocalMachine Unrestricted

    how do i bypass my already elevated script(as it is a system-User) to the Start-job script without Credential-information inside the script.
    Or if this is impossible by design, how can i run the script in background so it does not slow down the logon-process?

  • #87035

    Topics: 0
    Replies: 48
    Points: 0
    Rank: Member

    Your start-job should inherit the permissions from the parent script calling start-job. Just don't specify the credential parameter when calling start-job. Also make sure your parent script isn't waiting for the job to finish otherwise your users will see the delay.

The topic ‘starb-job from start-skript bypassing the elevation’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort