Sets a Scheduled Task’s runtime user as the given gMSA/MSA.
Set-SchTaskMsa.ps1 [-TaskName] <String> [-ServiceAccount] <String> [-HighestRunLevel]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Set-SchTaskMsa.ps1 'Backup VSCode settings' automation
Sets the tasks running user to the “automation” managed service account.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: (All)
Aliases: MSA, gMSA, UserId
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.