-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathGet-PSUJob.txt
More file actions
277 lines (199 loc) · 11.9 KB
/
Get-PSUJob.txt
File metadata and controls
277 lines (199 loc) · 11.9 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
NAME
Get-PSUJob
SYNOPSIS
Returns jobs run within PSU.
SYNTAX
Get-PSUJob [-Id] <Int64> [-AppToken <String>] [-ComputerName <String>] [-First <UInt64>] [-IncludeTotalCount] [-Integrated] [-OrderBy {Id | StartTime | EndTime}] [-OrderDirection {Descending | Ascending}] [-Skip <UInt64>] [-Status {Queued | Running | Completed | Failed | WaitingOnFeedback | Canceled | Canceling | Historical | Active | TimedOut | Warning}] [-UseDefaultCredentials] [-Credential <PSCredential>] [-HideChildren <Boolean>] [-TrustCertificate] [<CommonParameters>]
Get-PSUJob [-Identity] <Identity> [-AppToken <String>] [-ComputerName <String>] [-First <UInt64>] [-IncludeTotalCount] [-Integrated] [-OrderBy {Id | StartTime | EndTime}] [-OrderDirection {Descending | Ascending}] [-Skip <UInt64>] [-Status {Queued | Running | Completed | Failed | WaitingOnFeedback | Canceled | Canceling | Historical | Active | TimedOut | Warning}] [-UseDefaultCredentials] [-Credential <PSCredential>] [-HideChildren <Boolean>] [-HideScheduled <Boolean>] [-HideTriggered <Boolean>] [-TrustCertificate] [<CommonParameters>]
Get-PSUJob [-Script] <Script> [-AppToken <String>] [-ComputerName <String>] [-First <UInt64>] [-IncludeTotalCount] [-Integrated] [-OrderBy {Id | StartTime | EndTime}] [-OrderDirection {Descending | Ascending}] [-Skip <UInt64>] [-Status {Queued | Running | Completed | Failed | WaitingOnFeedback | Canceled | Canceling | Historical | Active | TimedOut | Warning}] [-UseDefaultCredentials] [-Credential <PSCredential>] [-HideChildren <Boolean>] [-HideScheduled <Boolean>] [-HideTriggered <Boolean>] [-TrustCertificate] [<CommonParameters>]
Get-PSUJob [-AppToken <String>] [-ComputerName <String>] [-First <UInt64>] [-IncludeTotalCount] [-Integrated] [-OrderBy {Id | StartTime | EndTime}] [-OrderDirection {Descending | Ascending}] [-Skip <UInt64>] [-Status {Queued | Running | Completed | Failed | WaitingOnFeedback | Canceled | Canceling | Historical | Active | TimedOut | Warning}] [-UseDefaultCredentials] -RunId <Guid> [-Credential <PSCredential>] [-HideChildren <Boolean>] [-TrustCertificate] [<CommonParameters>]
Get-PSUJob [-AppToken <String>] [-ComputerName <String>] [-First <UInt64>] [-IncludeTotalCount] [-Integrated] [-OrderBy {Id | StartTime | EndTime}] [-OrderDirection {Descending | Ascending}] [-Skip <UInt64>] [-Status {Queued | Running | Completed | Failed | WaitingOnFeedback | Canceled | Canceling | Historical | Active | TimedOut | Warning}] [-UseDefaultCredentials] -Schedule <Schedule> [-Credential <PSCredential>] [-HideChildren <Boolean>] [-HideScheduled <Boolean>] [-HideTriggered <Boolean>] [-TrustCertificate] [<CommonParameters>]
Get-PSUJob [-AppToken <String>] [-ComputerName <String>] [-First <UInt64>] [-IncludeTotalCount] [-Integrated] [-OrderBy {Id | StartTime | EndTime}] [-OrderDirection {Descending | Ascending}] [-Skip <UInt64>] [-Status {Queued | Running | Completed | Failed | WaitingOnFeedback | Canceled | Canceling | Historical | Active | TimedOut | Warning}] [-UseDefaultCredentials] [-Credential <PSCredential>] [-HideChildren <Boolean>] [-HideScheduled <Boolean>] [-HideTriggered <Boolean>] [-TrustCertificate] [<CommonParameters>]
DESCRIPTION
Returns jobs run within PSU.
PARAMETERS
-AppToken <String>
An app token to access the PSU API.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-ComputerName <String>
The HTTP address of the PSU REST API server.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases Uri
Accept wildcard characters? false
-First <UInt64>
Gets only the specified number of objects. Enter the number of objects to get.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-Id <Int64>
The ID of the job to return.
Required? true
Position? 0
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-Identity <Identity>
Returns jobs run by this identity.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Aliases none
Accept wildcard characters? false
-IncludeTotalCount [<SwitchParameter>]
Reports the total number of objects in the data set (an integer) followed by the selected objects. If the cmdlet cannot determine the total count, it displays "Unknown total count." The integer has an Accuracy property that indicates the reliability of the total count value. The value of Accuracy ranges from 0.0 to 1.0 where 0.0 means that the cmdlet could not count the objects, 1.0 means that the count is exact, and a value between 0.0 and 1.0 indicates an increasingly reliable estimate.
Required? false
Position? named
Default value False
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-Integrated [<SwitchParameter>]
Executes the command internally rather than using the Management API. Only works when running script from within PowerShell Universal.
Required? false
Position? named
Default value False
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-OrderBy <String>
Orders the output based on the property selected.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-OrderDirection <OrderDirection>
Orders ascending or descending.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-Script <Script>
Returns jobs based on this script.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Aliases none
Accept wildcard characters? false
-Skip <UInt64>
Ignores the specified number of objects and then gets the remaining objects. Enter the number of objects to skip.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-Status <JobStatus>
Filters output based on this status.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-UseDefaultCredentials [<SwitchParameter>]
Use default credentials when connecting to the management API
Required? false
Position? named
Default value False
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-RunId <Guid>
The run ID (GUID) for this job. Requires JobRunId experimental feature.
Required? true
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-Schedule <Schedule>
{{ Fill Schedule Description }}
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Aliases none
Accept wildcard characters? false
-Credential <PSCredential>
Credentials to login to the PowerShell Universal Management API.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-HideChildren <Boolean>
Does not return child jobs.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-HideScheduled <Boolean>
Does not return scheduled jobs.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-HideTriggered <Boolean>
Does not return triggered job.
Required? false
Position? named
Default value None
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
-TrustCertificate [<SwitchParameter>]
Whether the cmdlet should ignore certificate issues.
Required? false
Position? named
Default value False
Accept pipeline input? False
Aliases none
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
UniversalAutomation.Identity
UniversalAutomation.Script
OUTPUTS
System.Object
NOTES
-------------------------- Example 1 --------------------------
PS C:\> Get-UAJob
Returns all jobs run in PSU.
-------------------------- Example 2 --------------------------
PS C:\> Get-UAJob -Id 10
Returns job 10 from PSU.
-------------------------- Example 3 --------------------------
PS C:\> $Script = Get-UAScript -Id 4
PS C:\> Get-UAJob -Script $Script
Returns all jobs run for script with Id 4.
-------------------------- Example 4 --------------------------
PS C:\> Get-UAJob -Id 10 -Tree
Returns job 10 and any jobs (parent\child jobs) associated with it.
RELATED LINKS