Skip to content

xScheduledTask - missing option to configure tasks with gMSA accounts. #111

Closed
@bielawb

Description

@bielawb

At the moment there is no option to specify gMSA account as ExecuteAsCredential. Attempt to do that (by passing credential w/o password) will result in error:

The password supplied to the Desired State Configuration resource MSFT_xScheduledTask is not valid. The password cannot be null or empty.

Following instructions here it should be possible with the command used inside this resource:
https://blogs.technet.microsoft.com/askpfeplat/2012/12/16/windows-server-2012-group-managed-service-accounts/

The main difference I see is that this instructions suggest to use New-ScheduledTaskPrincipal and pass object created by it to -Principal parameter on Register-ScheduleTask command.

As this looks like a different code path from existing one I think it would be best to support it in separate parameter (mutually exclusive with ExecuteAsCredential), but would like to first verify this is not already planned to be addressed in a different manner.

As a result we can't use the resource to configure large portion of scheduled tasks that require gMSA account to run correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue is an enhancement request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions