-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTechAgent.Format.ps1xml
More file actions
88 lines (74 loc) · 2.39 KB
/
Copy pathTechAgent.Format.ps1xml
File metadata and controls
88 lines (74 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<Configuration>
<ViewDefinitions>
<View>
<Name>TechAgentGuiLaunchInfo</Name>
<ViewSelectedBy>
<TypeName>TechAgent.Gui.LaunchInfo</TypeName>
</ViewSelectedBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<Label>TechAgent</Label>
<ScriptBlock>
"GUI Launch Report"
</ScriptBlock>
</ListItem>
<ListItem>
<Label>Launch Profile</Label>
<ScriptBlock>
$profile = if ($_.ExecutablePath -match '\\AgentRuntime\\') { 'Packaged Runtime' } elseif ($_.ExecutablePath -match '\\bin\\Release\\') { 'Source Publish' } else { 'Custom Path' }
$profile
</ScriptBlock>
</ListItem>
<ListItem>
<Label>Executable</Label>
<ScriptBlock>
$_.ExecutablePath
</ScriptBlock>
</ListItem>
<ListItem>
<Label>Working Dir</Label>
<ScriptBlock>
$_.WorkingDirectory
</ScriptBlock>
</ListItem>
<ListItem>
<Label>Process ID</Label>
<ScriptBlock>
$_.ProcessId
</ScriptBlock>
</ListItem>
<ListItem>
<Label>Status</Label>
<ScriptBlock>
$status = if ($_.Started) { 'ONLINE' } else { 'NOT STARTED' }
$status
</ScriptBlock>
</ListItem>
<ListItem>
<Label>Process State</Label>
<ScriptBlock>
$running = Get-Process -Id $_.ProcessId -ErrorAction SilentlyContinue
if ($running) {
"Running"
}
else {
"Exited"
}
</ScriptBlock>
</ListItem>
<ListItem>
<Label>Timestamp</Label>
<ScriptBlock>
Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
</ScriptBlock>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>
</ViewDefinitions>
</Configuration>