Put WAU scheduled tasks to dedicated folder
parent
3c92204c44
commit
1fd93b6c04
|
@ -366,7 +366,7 @@ function Install-WingetAutoUpdate {
|
||||||
#Set task readable/runnable for all users
|
#Set task readable/runnable for all users
|
||||||
$scheduler = New-Object -ComObject "Schedule.Service"
|
$scheduler = New-Object -ComObject "Schedule.Service"
|
||||||
$scheduler.Connect()
|
$scheduler.Connect()
|
||||||
$task = $scheduler.GetFolder("").GetTask("Winget-AutoUpdate")
|
$task = $scheduler.GetFolder("WAU").GetTask("Winget-AutoUpdate")
|
||||||
$sec = $task.GetSecurityDescriptor(0xF)
|
$sec = $task.GetSecurityDescriptor(0xF)
|
||||||
$sec = $sec + '(A;;GRGX;;;AU)'
|
$sec = $sec + '(A;;GRGX;;;AU)'
|
||||||
$task.SetSecurityDescriptor($sec, 0)
|
$task.SetSecurityDescriptor($sec, 0)
|
||||||
|
|
Loading…
Reference in New Issue