-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from PlagueHO/Issue-74
BREAKING CHANGE: xScheduledTask: Add support for disabling built-in tasks - Fixes #74
- Loading branch information
Showing
9 changed files
with
961 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<# | ||
.EXAMPLE | ||
This example disables the built-in scheduled task called | ||
'CreateExplorerShellUnelevatedTask'. | ||
#> | ||
Configuration Example | ||
{ | ||
param | ||
( | ||
[Parameter()] | ||
[System.String[]] | ||
$NodeName = 'localhost' | ||
) | ||
|
||
Import-DscResource -ModuleName xComputerManagement | ||
|
||
Node $NodeName | ||
{ | ||
xScheduledTask DisableCreateExplorerShellUnelevatedTask | ||
{ | ||
TaskName = 'CreateExplorerShellUnelevatedTask' | ||
TaskPath = '\' | ||
Enable = $false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<# | ||
.EXAMPLE | ||
This example deletes the built-in scheduled task called | ||
'CreateExplorerShellUnelevatedTask'. | ||
#> | ||
Configuration Example | ||
{ | ||
param | ||
( | ||
[Parameter()] | ||
[System.String[]] | ||
$NodeName = 'localhost' | ||
) | ||
|
||
Import-DscResource -ModuleName xComputerManagement | ||
|
||
Node $NodeName | ||
{ | ||
xScheduledTask DeleteCreateExplorerShellUnelevatedTask | ||
{ | ||
TaskName = 'CreateExplorerShellUnelevatedTask' | ||
TaskPath = '\' | ||
Ensure = 'Absent' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
8cc11cf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is causing issues on Server 2016 at the moment. There already is a built-in Disable-ScheduledTask function and this helper one is not working on some system scheduled task. Removing it from the module fixed the problem for me.