register-ScheduledJob as local system

Welcome Forums General PowerShell Q&A register-ScheduledJob as local system

This topic contains 3 replies, has 2 voices, and was last updated by

2 years, 10 months ago.

  • Author
  • #41643

    Points: 1
    Rank: Member

    I need to schedule tasks on Windows 2008 R2 that would run as system/local service so they could be run when no users are logged in without saving a password. Can I do it using register-ScheduledJob?

    Here is a sample job

    $trigger = New-JobTrigger -Once -At 7am -RepetitionDuration ([TimeSpan]::MaxValue) -RepetitionInterval  (New-TimeSpan -Minutes 60)
    Register-ScheduledJob -Name Test-Trigger $trigger -ScriptBlock {get-service}
  • #41661

    Points: 260
    Team MemberHelping Hand
    Rank: Contributor

    I have done this in the past with Register-ScheduledTask.

  • #41664

    Points: 1
    Rank: Member

    Thanks Wes, but Register-ScheduledTask only available starting Windows 2012.

  • #41666

    Points: 1
    Rank: Member

    This link explains how to schedule tasks on earlier version of windows:

    But I say that I am bit surprise that Register-ScheduledTask is not available on Windows 2008 with powershell 4/5.


The topic ‘register-ScheduledJob as local system’ is closed to new replies.

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