Scheduledtask: Difference between revisions

From Piszczynski
m (1 revision imported)
No edit summary
 
Line 8: Line 8:
Run as admin:
Run as admin:
*Get-ScheduledTaskInfo -TaskName <task name>
*Get-ScheduledTaskInfo -TaskName <task name>
== Scheduled task error ==
If getting a scheduled task error "error 2147943712" it will be down to group policy settings denying the storage of the credentials.
Change the following reg key to allow this:<syntaxhighlight lang="powershell">
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa
Value Name: disabledomaincreds
Value Type: REG_DWORD
Values: 0 (allow domain credentials to be stored)
#script
# Run PowerShell as an Administrator
# Set the value of the registry key
Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Control\Lsa -Name "disabledomaincreds" -Value 0 -Type DWord
</syntaxhighlight>

Latest revision as of 12:08, 15 May 2024

Scheduled Tasks

Scheduled tasks are managed in task scheduler


Find details of scheduled task via powershell: Run as admin:

  • Get-ScheduledTaskInfo -TaskName <task name>

Scheduled task error

If getting a scheduled task error "error 2147943712" it will be down to group policy settings denying the storage of the credentials.

Change the following reg key to allow this:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa
Value Name: disabledomaincreds
Value Type: REG_DWORD
Values: 0 (allow domain credentials to be stored)

#script
# Run PowerShell as an Administrator
# Set the value of the registry key
Set-ItemProperty -Path HKLM:\System\CurrentControlSet\Control\Lsa -Name "disabledomaincreds" -Value 0 -Type DWord