Register-ScheduledJob local machine: Access Denied RRS feed

  • Question

  • - Windows 10 1809 x64,
    - Windows Powershell (not core),
    - Non-domain setup,
    - Account is in: Administrators, Performange Log Users, Power Users, Remote Management Users, Ssh Users, Users,
    - Works if I run in elevated mode

    My question: Is running in elevated mode the only option, or is there a group policy/registry setting I can use to allow myself to schedule jobs as me locally on my machine? If not, I basically can't replicate the Unix 'at' command for myself :(

    PS [C:\Users\oliver]
    > $sjpath = "$env:LocalAppData\Microsoft\Windows\PowerShell\ScheduledJobs"
    PS [C:\Users\oliver]
    > Test-Path $sjpath
    PS [C:\Users\oliver]
    > (Get-Item $sjpath | Get-Acl).Access | Where IdentityReference -Like "*\${env:username}"
    FileSystemRights  : FullControl
    AccessControlType : Allow
    IdentityReference : SPUD\oliver
    IsInherited       : True
    InheritanceFlags  : ContainerInherit, ObjectInherit
    PropagationFlags  : None
    PS [C:\Users\oliver]
    > Get-LocalGroupMember -Group Administrators -Member $env:username
    ObjectClass Name        PrincipalSource
    ----------- ----        ---------------
    User        SPUD\oliver MicrosoftAccount
    PS [C:\Users\oliver]
    > Register-ScheduledJob -Name Test { gci }
    Register-ScheduledJob : An access denied error occurred when registering scheduled job definition Test.  Try running
    Windows PowerShell with elevated user rights; that is, Run As Administrator.
    At line:1 char:1
    + Register-ScheduledJob -Name Test { gci }
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : PermissionDenied: (Microsoft.Power...edJobDefinition:ScheduledJobDefinition) [Register-S
       cheduledJob], RuntimeException
        + FullyQualifiedErrorId : UnauthorizedAccessToRegisterScheduledJobDefinition,Microsoft.PowerShell.ScheduledJob.Reg

    • Edited by quietbrit Wednesday, September 5, 2018 9:16 PM extra info
    Wednesday, September 5, 2018 9:11 PM

All replies