-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathGet-Service-DataGridView.psf
566 lines (521 loc) · 27.4 KB
/
Get-Service-DataGridView.psf
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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
<File version="2">
<FileID>9b26d912-2d9b-4ff7-b35e-78f86a6297e2</FileID>
<Preview>iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAADDXSURBVHhe7d13cNXnne/x3dkymVt2/9i5szN7
7+7s3dnN7t3ZFKc5sU1cYzuOY8cNJzYYCAYXcAHbVNO7Mb3bYEwz3WC6hEC9V1BvSEK96+ioIAn4
3Of5SbJBnCSmJYjn/fa8Bks653fO7wjO8/2dIv0ZERERERERERERERERERERERERERERERERERER
ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
ERERERERERERERERERERERERERERERERERERERERERERERERkaNFGcV/9Vd/Vfztb3+rePiwYcUv
vzwCAAD0A6+MHFl83733Fv/lX/5l8Z//+Z8XmzU931vd/1B/8Rd/UfVP//RPGvjcc1qwcLHCY1OV
V1zjyS2qBgAAt6i8klpl5JXos517NGTIEH3z3/5N5oBePUv8H6z4ObP47953SEm5lQpLK1JYaiEA
AOgHQlMKlZRXpbCoRI0cMULf+MY3OnvW99/ft/7rv4rnzFuoZLP4h6YUKMywfwIAgFufXbdPJOcr
paBG23fv010/+cnXGwCGDRtWHBqdoshTxQo3kwQ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A4iAEAAAAHMQAAAOAgBgAAABx00wcA
v7kAeyEAAODW0dLcpLM3YwCwcsubvekCAADcevIr7KJ/EwYAy04WAADg1nPp4m/d0AEAAAD0DwwA
AAA46NoGgBq/ciravDMDAID+J7OsRTX+C19/APjtb4eXNfq7VN8ib3IAAAD9T23zBZ27II0fP+Fi
zxL/+3vqqafzx4+f2GnO0GmnBgAA0B9N6JwwcVLnwIEDW3uWeCIiIiIiIiIiIiIiIiIiIiIiIiIi
IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi
IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi
IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi
IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi
IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIi
IiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiLH+rM/+/+guUdQQ+cO
WAAAAABJRU5ErkJggg==</Preview>
<Object type="System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="formMain" children="Controls">
<Property name="ClientSize">584, 362</Property>
<Property name="Name">formMain</Property>
<Property name="StartPosition">CenterScreen</Property>
<Property name="Text">Grid</Property>
<Event name="Load">formMain_Load</Event>
<Object type="System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="labelComputerName" children="Controls">
<Property name="Location">12, 27</Property>
<Property name="Name">labelComputerName</Property>
<Property name="Size">100, 23</Property>
<Property name="TabIndex">4</Property>
<Property name="Text">Computer Name</Property>
<Event name="Click">labelComputerName_Click</Event>
</Object>
<Object type="System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="textboxComputerName" children="Controls">
<Property name="Location">118, 24</Property>
<Property name="Name">textboxComputerName</Property>
<Property name="Size">454, 20</Property>
<Property name="TabIndex">3</Property>
<Event name="TextChanged">textboxComputerName_TextChanged</Event>
</Object>
<Object type="System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="datagridviewResults" children="Controls">
<Property name="AllowUserToAddRows">False</Property>
<Property name="AllowUserToDeleteRows">False</Property>
<Property name="Anchor">Top, Bottom, Left, Right</Property>
<Property name="Location">12, 69</Property>
<Property name="Name">datagridviewResults</Property>
<Property name="ReadOnly">True</Property>
<Property name="Size">560, 252</Property>
<Property name="TabIndex">2</Property>
<Event name="ColumnHeaderMouseClick">datagridviewResults_ColumnHeaderMouseClick</Event>
</Object>
<Object type="System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="buttonExit" children="Controls">
<Property name="Anchor">Bottom, Right</Property>
<Property name="Location">497, 327</Property>
<Property name="Name">buttonExit</Property>
<Property name="Size">75, 23</Property>
<Property name="TabIndex">1</Property>
<Property name="Text">E&xit</Property>
<Property name="UseVisualStyleBackColor">True</Property>
<Event name="Click">buttonExit_Click</Event>
</Object>
<Object type="System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="buttonLoad" children="Controls">
<Property name="Anchor">Bottom, Left</Property>
<Property name="Location">12, 327</Property>
<Property name="Name">buttonLoad</Property>
<Property name="Size">75, 23</Property>
<Property name="TabIndex">0</Property>
<Property name="Text">&Load</Property>
<Property name="UseVisualStyleBackColor">True</Property>
<Event name="Click">buttonLoad_Click</Event>
</Object>
</Object>
<Code><![CDATA[
#region Control Helper Functions
function Load-DataGridView
{
<#
.SYNOPSIS
This functions helps you load items into a DataGridView.
.DESCRIPTION
Use this function to dynamically load items into the DataGridView control.
.PARAMETER DataGridView
The ComboBox control you want to add items to.
.PARAMETER Item
The object or objects you wish to load into the ComboBox's items collection.
.PARAMETER DataMember
Sets the name of the list or table in the data source for which the DataGridView is displaying data.
#>
Param (
[ValidateNotNull()]
[Parameter(Mandatory = $true)]
[System.Windows.Forms.DataGridView]
$DataGridView,
[ValidateNotNull()]
[Parameter(Mandatory = $true)]
$Item,
[Parameter(Mandatory = $false)]
[string]
$DataMember
)
$DataGridView.SuspendLayout()
$DataGridView.DataMember = $DataMember
if ($Item -is [System.ComponentModel.IListSource]`
-or $Item -is [System.ComponentModel.IBindingList] -or $Item -is [System.ComponentModel.IBindingListView])
{
$DataGridView.DataSource = $Item
}
else
{
$array = New-Object System.Collections.ArrayList
if ($Item -is [System.Collections.IList])
{
$array.AddRange($Item)
}
else
{
$array.Add($Item)
}
$DataGridView.DataSource = $array
}
$DataGridView.ResumeLayout()
}
function ConvertTo-DataTable
{
<#
.SYNOPSIS
Converts objects into a DataTable.
.DESCRIPTION
Converts objects into a DataTable, which are used for DataBinding.
.PARAMETER InputObject
The input to convert into a DataTable.
.PARAMETER Table
The DataTable you wish to load the input into.
.PARAMETER RetainColumns
This switch tells the function to keep the DataTable's existing columns.
.PARAMETER FilterWMIProperties
This switch removes WMI properties that start with an underline.
.EXAMPLE
$DataTable = ConvertTo-DataTable -InputObject (Get-Process)
#>
[OutputType([System.Data.DataTable])]
param (
[ValidateNotNull()]
$InputObject,
[ValidateNotNull()]
[System.Data.DataTable]
$Table,
[switch]
$RetainColumns,
[switch]
$FilterWMIProperties)
if ($Table -eq $null)
{
$Table = New-Object System.Data.DataTable
}
if ($InputObject -is [System.Data.DataTable])
{
$Table = $InputObject
}
else
{
if (-not $RetainColumns -or $Table.Columns.Count -eq 0)
{
#Clear out the Table Contents
$Table.Clear()
if ($InputObject -eq $null) { return } #Empty Data
$object = $null
#find the first non null value
foreach ($item in $InputObject)
{
if ($item -ne $null)
{
$object = $item
break
}
}
if ($object -eq $null) { return } #All null then empty
#Get all the properties in order to create the columns
foreach ($prop in $object.PSObject.Get_Properties())
{
if (-not $FilterWMIProperties -or -not $prop.Name.StartsWith('__'))#filter out WMI properties
{
#Get the type from the Definition string
$type = $null
if ($prop.Value -ne $null)
{
try { $type = $prop.Value.GetType() }
catch { }
}
if ($type -ne $null) # -and [System.Type]::GetTypeCode($type) -ne 'Object')
{
[void]$table.Columns.Add($prop.Name, $type)
}
else #Type info not found
{
[void]$table.Columns.Add($prop.Name)
}
}
}
if ($object -is [System.Data.DataRow])
{
foreach ($item in $InputObject)
{
$Table.Rows.Add($item)
}
return @(, $Table)
}
}
else
{
$Table.Rows.Clear()
}
foreach ($item in $InputObject)
{
$row = $table.NewRow()
if ($item)
{
foreach ($prop in $item.PSObject.Get_Properties())
{
if ($table.Columns.Contains($prop.Name))
{
$row.Item($prop.Name) = $prop.Value
}
}
}
[void]$table.Rows.Add($row)
}
}
return @(, $Table)
}
#endregion
$formMain_Load = {
#TODO: Initialize Form Controls here
$textboxComputerName.Text = $env:COMPUTERNAME
$buttonLoad_Click.Invoke()
}
$buttonExit_Click = {
#TODO: Place custom script here
$formMain.Close()
}
$buttonLoad_Click = {
#TODO: Place custom script here
# ---------------------------------
# Sample Code to Load Grid
# ---------------------------------
# $processes = Get-WmiObject Win32_Process -Namespace "Root\CIMV2"
# Load-DataGridView -DataGridView $datagridviewResults -Item $processes
# ---------------------------------
# Sample Code to Load Sortable Data
# ---------------------------------
# $processes = Get-WmiObject Win32_Process -Namespace "Root\CIMV2"
# $table = ConvertTo-DataTable -InputObject $processes -FilterWMIProperties
# Load-DataGridView -DataGridView $datagridviewResults -Item $table
try
{
$services = Get-Service -ComputerName $textboxComputerName.Text -ErrorAction 'Stop' |
Select-Object -Property Name, DisplayName, Status, ServiceType, CanStop, CanShutDown, CanPauseAndContinue
}
catch [InvalidOperationException]
{
[void][System.Windows.Forms.MessageBox]::Show("Cannot get services on computer: $($textboxComputerName.Text). `n`nCheck the spelling and credentials and try again.", "Service error")
}
catch
{
[void][System.Windows.Forms.MessageBox]::Show("$($Error[0].Exception.Message)", "Unexpected error")
}
if ($services)
{
$table = ConvertTo-DataTable -InputObject $services
Load-DataGridView -DataGridView $datagridviewResults -Item $table
}
}
$datagridviewResults_ColumnHeaderMouseClick = [System.Windows.Forms.DataGridViewCellMouseEventHandler]{
#Event Argument: $_ = [System.Windows.Forms.DataGridViewCellMouseEventArgs]
if ($datagridviewResults.DataSource -is [System.Data.DataTable])
{
$column = $datagridviewResults.Columns[$_.ColumnIndex]
$direction = [System.ComponentModel.ListSortDirection]::Ascending
if ($column.HeaderCell.SortGlyphDirection -eq 'Descending')
{
$direction = [System.ComponentModel.ListSortDirection]::Descending
}
$datagridviewResults.Sort($datagridviewResults.Columns[$_.ColumnIndex], $direction)
}
}
$labelComputerName_Click = {
#TODO: Place custom script here
}
$textboxComputerName_TextChanged = {
#TODO: Place custom script here
if ($textboxComputerName.Text -eq "")
{
$buttonLoad.Enabled = $false
#$datagridviewResults.Rows.Clear()
$datagridviewResults.DataSource = $null
}
else
{
$buttonLoad.Enabled = $true
}
}
]]></Code>
<Mode>1</Mode>
<Assemblies>
<Assembly>System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</Assembly>
<Assembly>mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Assembly>
<Assembly>System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Assembly>
<Assembly>System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Assembly>
<Assembly>System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Assembly>
<Assembly>System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<Assembly>System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Assembly>
<Assembly>System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<Assembly>System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Assembly>
<Assembly>System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
</Assemblies>
</File>