Created
September 16, 2020 07:41
-
-
Save win2000b/a91142bde49d2e93449fab88dcc9f819 to your computer and use it in GitHub Desktop.
Scheduled task to restart search service on WVD
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
<?xml version="1.0" encoding="UTF-16"?> | |
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<Date>2020-09-15T15:31:06.0051067</Date> | |
<Author>DOMAIN\user</Author> | |
<URI>\Restart Windows Search Service</URI> | |
</RegistrationInfo> | |
<Triggers> | |
<EventTrigger> | |
<Enabled>true</Enabled> | |
<Subscription><QueryList><Query Id="0" Path="Application"><Select Path="Application">*[System[(EventID=1000)]] and *[EventData[Data[1]='explorer.exe']]</Select></Query></QueryList></Subscription> | |
</EventTrigger> | |
</Triggers> | |
<Principals> | |
<Principal id="Author"> | |
<UserId>S-1-5-21-764032395-3407746550-2380121757-6666</UserId> | |
<LogonType>Password</LogonType> | |
<RunLevel>HighestAvailable</RunLevel> | |
</Principal> | |
</Principals> | |
<Settings> | |
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> | |
<DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries> | |
<StopIfGoingOnBatteries>true</StopIfGoingOnBatteries> | |
<AllowHardTerminate>true</AllowHardTerminate> | |
<StartWhenAvailable>false</StartWhenAvailable> | |
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> | |
<IdleSettings> | |
<StopOnIdleEnd>true</StopOnIdleEnd> | |
<RestartOnIdle>false</RestartOnIdle> | |
</IdleSettings> | |
<AllowStartOnDemand>true</AllowStartOnDemand> | |
<Enabled>true</Enabled> | |
<Hidden>false</Hidden> | |
<RunOnlyIfIdle>false</RunOnlyIfIdle> | |
<WakeToRun>false</WakeToRun> | |
<ExecutionTimeLimit>PT72H</ExecutionTimeLimit> | |
<Priority>7</Priority> | |
</Settings> | |
<Actions Context="Author"> | |
<Exec> | |
<Command>cmd.exe</Command> | |
<Arguments>/c NET Stop Wsearch && NET Start WSearch</Arguments> | |
</Exec> | |
</Actions> | |
</Task> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment