質問編集履歴
1
内容を修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,11 +6,13 @@
|
|
6
6
|
|
7
7
|
```ここに言語を入力
|
8
8
|
|
9
|
+
$TaskName = "TEST"
|
10
|
+
|
9
11
|
$trigger = New-ScheduledTaskTrigger -AtLogon -RandomDelay(New-TimeSpan -Seconds 30)
|
10
12
|
|
11
|
-
$action = New-ScheduledTaskAction -Execute
|
13
|
+
$action = New-ScheduledTaskAction -Execute 実行プログラムパス
|
12
14
|
|
13
|
-
$principal = New-ScheduledTaskPrincipal -UserID "
|
15
|
+
$principal = New-ScheduledTaskPrincipal -UserID "ユーザー名" -LogonType ServiceAccount -RunLevel Highest
|
14
16
|
|
15
17
|
$settings = New-ScheduledTaskSettingsSet -MultipleInstances Parallel -RestartCount 3 -RestartInterval(New-TimeSpan -Minutes 1)
|
16
18
|
|