Fixed naming and added task scheduling script
This commit is contained in:
parent
cdc7da86f3
commit
34667f252e
|
@ -473,7 +473,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"guid": "57997ec7-b293-4fd5-9f90-a25426d0eb90",
|
"guid": "57997ec7-b293-4fd5-9f90-a25426d0eb90",
|
||||||
"filename": "Get_Computer_Users.ps1",
|
"filename": "Win_Get_Computer_Users.ps1",
|
||||||
"submittedBy": "https://github.com/tremor021",
|
"submittedBy": "https://github.com/tremor021",
|
||||||
"name": "Get Computer Users",
|
"name": "Get Computer Users",
|
||||||
"description": "Get list of computer users and show which one is enabled",
|
"description": "Get list of computer users and show which one is enabled",
|
||||||
|
@ -482,7 +482,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"guid": "77da9c87-5a7a-4ba1-bdde-3eeb3b01d62d",
|
"guid": "77da9c87-5a7a-4ba1-bdde-3eeb3b01d62d",
|
||||||
"filename": "Set_Network_To_Private.ps1",
|
"filename": "Win_Set_Network_To_Private.ps1",
|
||||||
"submittedBy": "https://github.com/tremor021",
|
"submittedBy": "https://github.com/tremor021",
|
||||||
"name": "Set Network To Private",
|
"name": "Set Network To Private",
|
||||||
"description": "Sets current network type to Private",
|
"description": "Sets current network type to Private",
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Add a task to Task Scheduler
|
||||||
|
|
||||||
|
$Trigger = New-ScheduledTaskTrigger -At 10:00am –Daily # Specify the trigger settings
|
||||||
|
$User = "NT AUTHORITY\SYSTEM" # Specify the account to run the script
|
||||||
|
$Action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "YOUR COMMAND HERE" # Specify what program to run and with its parameters
|
||||||
|
Register-ScheduledTask -TaskName "SomeTaskName" -Trigger $Trigger -User $User -Action $Action -RunLevel Highest –Force # Specify the name of the task
|
Loading…
Reference in New Issue