title: How can I force a Windows scheduled job to run as an Administrator
body: <p>When executing the batch file interactively in the "run as an administrator" mode, .bat performs as expected.</p>
  
  <p>However, when running it using Windows Scheduler, it appears to be lacking permissions.</p>
  
  <p>Tried the following with lo luck:</p>
  
  <ul>
  <li>"run with the highest privileges" - in the scheduled job properties</li>
  <li>make sched. job owned by the local service account, local Administrator account etc</li>
  <li>run a shortcut to the .bat instead, which is set to execute under Administrative account in shortcut's properties </li>
  </ul>
  
  <p>whoami /all - during scheduled run - reports that High Mandatory Level group is associated with the .bat</p>
  
  <p>Any ideas how this can be enforced in the Scheduler / scheduled job?</p>
  
  <p>==========================================================</p>
  
  <p><strong>EDIT @Harry Johnston</strong></p>
  
  <p>Output of whoami /all:</p>
  
  <pre><code>USER INFORMATION
  ----------------
  
  User Name                SID                                           
  ======================== ==============================================
  server1\local-admin S-1-5-21-2412003395-1771022845-1738666672-1000
  
  
  GROUP INFORMATION
  -----------------
  
  Group Name                                                    Type             SID          Attributes                                                     
  ============================================================= ================ ============ ===============================================================
  Everyone                                                      Well-known group S-1-1-0      Mandatory group, Enabled by default, Enabled group             
  NT AUTHORITY\Local account and member of Administrators group Well-known group S-1-5-114    Mandatory group, Enabled by default, Enabled group             
  BUILTIN\Administrators                                        Alias            S-1-5-32-544 Mandatory group, Enabled by default, Enabled group, Group owner
  BUILTIN\Users                                                 Alias            S-1-5-32-545 Mandatory group, Enabled by default, Enabled group             
  NT AUTHORITY\BATCH                                            Well-known group S-1-5-3      Mandatory group, Enabled by default, Enabled group             
  CONSOLE LOGON                                                 Well-known group S-1-2-1      Mandatory group, Enabled by default, Enabled group             
  NT AUTHORITY\Authenticated Users                              Well-known group S-1-5-11     Mandatory group, Enabled by default, Enabled group             
  NT AUTHORITY\This Organization                                Well-known group S-1-5-15     Mandatory group, Enabled by default, Enabled group             
  NT AUTHORITY\Local account                                    Well-known group S-1-5-113    Mandatory group, Enabled by default, Enabled group             
  LOCAL                                                         Well-known group S-1-2-0      Mandatory group, Enabled by default, Enabled group             
  NT AUTHORITY\NTLM Authentication                              Well-known group S-1-5-64-10  Mandatory group, Enabled by default, Enabled group             
  Mandatory Label\High Mandatory Level                          Label            S-1-16-12288 Mandatory group, Enabled by default, Enabled group             
  </code></pre>