How to make “NT-AUTHORITY\INTERACTIVE” available to scheduled tasks WITHOUT any session or interactive logon?

Thorsten Schöning 81 Reputation points
2021-04-30T14:50:08.443+00:00

I'm trying to find a workaround for a problem I have with VirtualBox. To make a long story short, starting headless VMs for a specially created restricted normal non-admin user virtual_box seems to ONLY work in case of an interactive session. This can either be a whole logon using RDP with desktop and stuff or as well an admin-desktop with only an interactively started cmd.exe as the one special restricted user virtual_box. What does NOT work is using the same user with the task scheduler and the only difference I found so far is the group membership of the started process, which either has NOT-AUTHORITY\INTERACTIVE or not.

Is there some way by the task scheduler to make a started process have that membership WITHOUT forcing ANY actual interactive user session, desktop, RDP etc. being available?

The only options I see limit to when a task is created, require a desktop session and stuff like that. But that's exactly NOT what I want, the VM should be headless/invisible and automatically started after boot without any user interaction.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,636 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Carl Fan 6,836 Reputation points
    2021-05-03T07:17:18.54+00:00

    Hi,
    Thank you for your post.
    As far as I know, I'm afraid that we could not automatically started after boot without any user interaction. The user that the scheduled task runs as logged in and set the task option to only run when the user is logged in.
    As you said, we could have an interactive session run a task as a service. Using schtasks command starting the task under the system account by default, and interacting with the desktop or RDP with desktop.
    For VirtualBox, it only provides that Use Task Scheduler to create auto VM start/stop.
    https://forums.virtualbox.org/viewtopic.php?f=6&t=49119
    Hope this helps and please help to accept as Answer if the response is useful.
    Best Regards,
    Carl

    0 comments No comments