-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path1033.html
More file actions
849 lines (762 loc) · 39.8 KB
/
1033.html
File metadata and controls
849 lines (762 loc) · 39.8 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
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
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="PoshCode - Community resources for PowerShell coders">
<meta name="author" content="Joel Bennett">
<title>Computer Inventory - PoshCode</title>
<link rel="stylesheet" href="https://poshcode.org/css/superhero.min.css">
<link rel="stylesheet" href="https://poshcode.org/css/main.css">
<link rel="stylesheet" href="https://poshcode.org/css/highlight/arta.css">
<style>
body {
padding-top: 50px;
padding-bottom: 20px;
}
</style>
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm fixed-top navbar-dark bg-dark">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="https://PoshCode.org/">PoshCode</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div id="navbarResponsive" class="collapse navbar-collapse navbar-responsive-collapse navbar-right">
<ul class="nav navbar-nav nav-tabs ml-auto" id="tabs">
<li class="nav-item"><a class="nav-link" href="https://poshcode.org/">Join Us!</a></li>
<li class="nav-item"><a class="nav-link active show" href="https://poshcode.org/scripts" data-toggle="tab">Scripts</a></li>
<li class="nav-item"><a class="nav-link" href="https://poshcode.org/video">Videos</a></li>
</ul>
</div><!--/.navbar-collapse -->
</div>
</nav>
</header>
<div class="container">
<div class="blog-header">
<h1 class="blog-title">PoshCode</h1>
<p class="lead blog-description">Community resources for PowerShell coders</p>
</div>
<div class="row">
<div class="blog-post">
<h2 class="blog-post-title">Computer Inventory</h2>
<p class="blog-post-meta">
<span class="blog-post-time">2009-04-15</span> by <a class="blog-post-author">Joel Bennett</a>
</p>
<h3>Download <a href="https://poshcode.org/scripts/1033.ps1">Computer Inventory.ps1</a> - <a href="https://poshcode.org/scripts/596.html">parent</a></h3>
<p>Script Creates Form and Retrieves Remote (and Local) Computer Inventory.
Collects Computers Name,CPU,Type,Automatic Updates Status,Total Memory,Free memory,Total Disk Size, Free Disk Size,IP Addresses, Time Zone, Hotfixes, BIOS, System Restore Status, Offline Files Status, RDP Status Remote Assitance Status, Printers, Network Drives, Symantec AV Status and output all to screen and to a CSV File.
Enjoy !</p>
<p>Fixed a bug where it was only exporting the most recent computer (line 717, do a diff) - Joel</p>
<pre><code class="language-powershell"># ========================================================
#
# Script Information
#
# Title: Remote Computer Inventory
# Author: Assaf Miron
# Originally created: 21/06/2008
# Original path: Computer-Inventory.PS1
# Description: Collects Remote Computer Data Using WMI and Registry Access
# Outputs all information to a Data Grid Form and to a CSV Log File
#
# ========================================================
#region Constructor
# Import Assembly
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[void][System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
# Log File where the results are Saved
$LogFile = "C:\Monitoring\Test-Monitor.csv"
# Check to see if the Log File Directory exists
If((Test-Path ($LogFile.Substring(0,$logFile.LastIndexof("\")))) -eq $False)
{
# Create The Directory
New-Item ($LogFile.Substring(0,$logFile.LastIndexof("\"))) -Type Directory
}
#endregion
#region Form Creation
#~~< Form1 >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$Form1 = New-Object System.Windows.Forms.Form
$Form1.AutoSize = $TRUE
$Form1.ClientSize = New-Object System.Drawing.Size(522, 404)
$Form1.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterScreen
$Form1.Text = "Computer Inventory"
#~~< Panel1 >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$Panel1 = new-object System.Windows.Forms.Panel
$Panel1.Dock = [System.Windows.Forms.DockStyle]::Fill
$Panel1.Location = new-object System.Drawing.Point(0, 24)
$Panel1.Size = new-object System.Drawing.Size(522, 380)
$Panel1.TabIndex = 20
$Panel1.Text = ""
#~~< btnRun >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$btnRun = New-Object System.Windows.Forms.Button
$btnRun.Enabled = $FALSE
$btnRun.Location = New-Object System.Drawing.Point(431, 30)
$btnRun.Size = New-Object System.Drawing.Size(75, 23)
$btnRun.TabIndex = 2
$btnRun.Text = "Run"
$btnRun.UseVisualStyleBackColor = $TRUE
$btnRun.add_Click({ RunScript($btnRun) })
#~~< Label1 >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$Label1 = New-Object System.Windows.Forms.Label
$Label1.AutoSize = $False#$TRUE
$Label1.Location = New-Object System.Drawing.Point(12, 31)
$Label1.Size = New-Object System.Drawing.Size(163, 13)
$Label1.TabIndex = 15
$Label1.Text = "File containing Computer Names"
#~~< TextBox1 >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$TextBox1 = New-Object System.Windows.Forms.TextBox
$TextBox1.Location = New-Object System.Drawing.Point(177, 30)
$TextBox1.Size = New-Object System.Drawing.Size(161, 20)
$TextBox1.TabIndex = 0
$TextBox1.Text = ""
#~~< btnBrowse >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$btnBrowse = New-Object System.Windows.Forms.Button
$btnBrowse.Location = New-Object System.Drawing.Point(347, 30)
$btnBrowse.Size = New-Object System.Drawing.Size(75, 23)
$btnBrowse.TabIndex = 1
$btnBrowse.Text = "Browse"
$btnBrowse.UseVisualStyleBackColor = $TRUE
$btnBrowse.add_Click({ BrowseFile($btnBrowse) })
#~~< DataGridView1 >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$DataGridView1 = new-object System.Windows.Forms.DataGridView
$DataGridView1.Anchor = ([System.Windows.Forms.AnchorStyles]([System.Windows.Forms.AnchorStyles]::Top -bor [System.Windows.Forms.AnchorStyles]::Bottom -bor [System.Windows.Forms.AnchorStyles]::Left -bor [System.Windows.Forms.AnchorStyles]::Right))
$DataGridView1.ColumnHeadersHeightSizeMode = [System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode]::AutoSize
$DataGridView1.Location = New-Object System.Drawing.Point(12, 59)
$DataGridView1.Size = New-Object System.Drawing.Size(497, 280)
$DataGridView1.TabIndex = 4
$DataGridView1.ClipboardCopyMode = [System.Windows.Forms.DataGridViewClipboardCopyMode]::Disable
$DataGridView1.Text = ""
#~~< ProgressBar1 >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ProgressBar1 = New-Object System.Windows.Forms.ProgressBar
$ProgressBar1.Anchor = ([System.Windows.Forms.AnchorStyles] ([System.Windows.Forms.AnchorStyles]::Bottom -bor [System.Windows.Forms.AnchorStyles]::Left -bor [System.Windows.Forms.AnchorStyles]::Right ))
$ProgressBar1.Location = New-Object System.Drawing.Point(12, 345)
$ProgressBar1.Size = New-Object System.Drawing.Size(410, 23)
$ProgressBar1.TabIndex = 5
$ProgressBar1.Text = ""
#~~< btnExit >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$btnExit = New-Object System.Windows.Forms.Button
$btnExit.Anchor = ([System.Windows.Forms.AnchorStyles]([System.Windows.Forms.AnchorStyles]::Bottom -bor [System.Windows.Forms.AnchorStyles]::Right))
$btnExit.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
$btnExit.Location = New-Object System.Drawing.Point(431, 345)
$btnExit.Size = New-Object System.Drawing.Size(78, 23)
$btnExit.TabIndex = 3
$btnExit.Text = "Exit"
$btnExit.UseVisualStyleBackColor = $TRUE
$btnExit.add_Click({ CloseForm($btnExit) })
#~~< MenuStrip1 >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$MenuStrip1 = new-object System.Windows.Forms.MenuStrip
$MenuStrip1.Location = new-object System.Drawing.Point(0, 0)
$MenuStrip1.Size = new-object System.Drawing.Size(292, 24)
$MenuStrip1.TabIndex = 6
$MenuStrip1.Text = "MenuStrip1"
#~~< FileToolStripMenuItem >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$FileToolStripMenuItem = new-object System.Windows.Forms.ToolStripMenuItem
$FileToolStripMenuItem.Size = new-object System.Drawing.Size(35, 20)
$FileToolStripMenuItem.Text = "File"
#~~< OpenLogFileToolStripMenuItem >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$OpenLogFileToolStripMenuItem = new-object System.Windows.Forms.ToolStripMenuItem
$OpenLogFileToolStripMenuItem.Size = new-object System.Drawing.Size(152, 22)
$OpenLogFileToolStripMenuItem.Text = "Open Log File"
$OpenLogFileToolStripMenuItem.add_Click({Open-file($OpenLogFileToolStripMenuItem)})
#~~< ExitToolStripMenuItem >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ExitToolStripMenuItem = new-object System.Windows.Forms.ToolStripMenuItem
$ExitToolStripMenuItem.Size = new-object System.Drawing.Size(152, 22)
$ExitToolStripMenuItem.Text = "Exit"
$ExitToolStripMenuItem.add_Click({CloseForm($ExitToolStripMenuItem)})
$FileToolStripMenuItem.DropDownItems.AddRange([System.Windows.Forms.ToolStripItem[]](@($OpenLogFileToolStripMenuItem, $ExitToolStripMenuItem)))
#~~< HelpToolStripMenuItem >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$HelpToolStripMenuItem = new-object System.Windows.Forms.ToolStripMenuItem
$HelpToolStripMenuItem.Size = new-object System.Drawing.Size(40, 20)
$HelpToolStripMenuItem.Text = "Help"
#~~< AboutToolStripMenuItem >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$AboutToolStripMenuItem = new-object System.Windows.Forms.ToolStripMenuItem
$AboutToolStripMenuItem.Size = new-object System.Drawing.Size(152, 22)
$AboutToolStripMenuItem.Text = "About"
$AboutToolStripMenuItem.add_Click({Show-About($AboutToolStripMenuItem)})
#~~< HowToToolStripMenuItem >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$HowToToolStripMenuItem = new-object System.Windows.Forms.ToolStripMenuItem
$HowToToolStripMenuItem.Size = new-object System.Drawing.Size(152, 22)
$HowToToolStripMenuItem.Text = "How To?"
$HowToToolStripMenuItem.add_Click({Show-HowTo($HowToToolStripMenuItem)})
$HelpToolStripMenuItem.DropDownItems.AddRange([System.Windows.Forms.ToolStripItem[]](@($AboutToolStripMenuItem, $HowToToolStripMenuItem)))
$MenuStrip1.Items.AddRange([System.Windows.Forms.ToolStripItem[]](@($FileToolStripMenuItem, $HelpToolStripMenuItem)))
$Panel1.Controls.Add($MenuStrip1)
$Panel1.Controls.Add($btnRun)
$Panel1.Controls.Add($Label1)
$Panel1.Controls.Add($TextBox1)
$Panel1.Controls.Add($btnBrowse)
$Panel1.Controls.Add($ProgressBar1)
$Panel1.Controls.Add($btnExit)
$Panel1.Controls.Add($DataGridView1)
$Panel1.Controls.Add($Menu)
$Form1.Controls.Add($Panel1)
#~~< Ping1 >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$Ping1 = New-Object System.Net.NetworkInformation.Ping
#~~< OpenFileDialog1 >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$OpenFileDialog1 = New-Object System.Windows.Forms.OpenFileDialog
$OpenFileDialog1.Filter = "Text Files|*.txt|CSV Files|*.csv|All Files|*.*"
$OpenFileDialog1.InitialDirectory = "C:"
$OpenFileDialog1.Title = "Open Computers File"
#~~< objNotifyIcon >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
# Assign an Icon and Icon Type For the NotifyIcon Object
$objNotifyIcon.Icon = "D:\Assaf\Scripts\Icons\XP\people15.ico"
$objNotifyIcon.BalloonTipIcon = "Info"
#endregion
#region Functions
function out-DataTable
# Function Creates a New Data Table that will be set as the Data Source of the Data Grid View
# Thanks to /\/\o\/\/ http:\\thePowerShellGuy.com
{
$dt = New-Object Data.datatable
$First = $TRUE
foreach ($item in $Input)
{
$DR = $DT.NewRow()
$Item.PsObject.get_properties() | foreach {
if ($first)
{
$Col = New-Object Data.DataColumn
$Col.ColumnName = $_.Name.ToString()
$DT.Columns.Add($Col) }
if ($_.value -eq $null)
{
$DR.Item($_.Name) = "[empty]"
}
elseif ($_.IsArray) {
$DR.Item($_.Name) = [string]::Join($_.value, ";")
}
else
{
$DR.Item($_.Name) = $_.value
}
}
$DT.Rows.Add($DR)
$First = $FALSE
}
return @(, ( $dt ))
}
function Join-Data
# Function Joins arrays and Strings to a Single Object with Members
# I Used the same principle of the Out-DataTable and converted it to Join Objects into one
# Using the Add-Member cmdlet. the Function writes to a predefiend object named $DataObject
{
param($objName="") # This parameter is used for objects that don't have member other than Length like Strings
foreach ($item in $Input)
{
$Item.PsObject.get_properties() | foreach{
if ($_.value -eq $null)
{
$DataObject | Add-Member noteproperty $_.Name "[empty]"
}
elseif ($_.IsArray) {
$DataObject | Add-Member noteproperty $_.Name [string]::Join($_.value, ";")
}
elseif ($objName -ne "") {
$DataObject | Add-Member noteproperty $objName $Item
}
else
{
$DataObject | Add-Member noteproperty $_.Name $_.value -Force
}
}
}
return @(,$DataObject)
}
function Get-Reg {
# Function Connects to a remote computer Registry using the Parameters it recievs
param(
$Hive,
$Key,
$Value,
$RemoteComputer="." # If not enterd Local Computer is Selected
)
# Connect to Remote Computer Registry
$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey($Hive, $RemoteComputer)
# Open Remote Sub Key
$regKey= $reg.OpenSubKey($Key)
if($regKey.ValueCount -gt 0) # check if there are Values
{$regKey.GetValue($Value)} # Return Value
}
function Get-WMIItem {
# Function Retreives a specific Item from a remote computer's WMI
param(
$Class,
$RemoteComputer=".", # If not enterd Local Computer is Selected
$Item,
$Query="", # If not enterd an empty WMI SQL Query is Entered
$Filter="" # If not enterd an empty Filter is Entered
)
if ($Query -eq "") # No Specific WMI SQL Query
{
# Execute WMI Query, Return only the Requsted Items
gwmi -Class $Class -ComputerName $RemoteComputer -Filter $Filter -Property $Item | Select $Item
}
else # User Entered a WMI SQL Query
{gwmi -ComputerName $RemoteComputer -Query $Query | select $Item}
}
function Show-NotifyIcon {
# Function Controls the Notification Icon
# Changes its Title and Text
param(
$Title,
$Text
)
# Change Notify Icon Title
$objNotifyIcon.BalloonTipTitle = $Title
# Change Notify Icon Text
$objNotifyIcon.BalloonTipText = $Text
# Show Notify Icon for 10 Secs
$objNotifyIcon.Visible = $TRUE
$objNotifyIcon.ShowBalloonTip(10000)
}
#endregion
#region Event Loop
function Main
# Main Function, Runs the Form
{
[System.Windows.Forms.Application]::EnableVisualStyles()
[System.Windows.Forms.Application]::Run($Form1)
}
#endregion
#region Event Handlers
function BrowseFile($object)
# Function for Running the OpenFileDialog
# Used when Clicking on the Browse Button
{
$OpenFileDialog1.showdialog()
$TextBox1.Text = $OpenFileDialog1.FileName
$btnRun.Enabled = $TRUE
}
function Open-File( $object ){
# Function Open the Log File
if(Test-Path $LogFile){
Invoke-Item $LogFile
}
}
function Show-PopUp
# Function for Showing Custom Pop up Forms
{
param(
$PopupTitle,
$PopupText
)
#~~< PopupForm >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$PopupForm = New-Object System.Windows.Forms.Form
$PopupForm.ClientSize = New-Object System.Drawing.Size(381, 356)
$PopupForm.ControlBox = $false
$PopupForm.ShowInTaskbar = $false
$PopupForm.StartPosition = [System.Windows.Forms.FormStartPosition]::CenterParent
$PopupForm.Text = $PopupTitle
#~~< PopupColse >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$PopupColse = New-Object System.Windows.Forms.Button
$PopupColse.Anchor = ([System.Windows.Forms.AnchorStyles]([System.Windows.Forms.AnchorStyles]::Bottom -bor [System.Windows.Forms.AnchorStyles]::Left -bor [System.Windows.Forms.AnchorStyles]::Right))
$PopupColse.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
$PopupColse.Location = New-Object System.Drawing.Point(137, 321)
$PopupColse.Size = New-Object System.Drawing.Size(104, 23)
$PopupColse.TabIndex = 0
$PopupColse.Text = "Close"
$PopupColse.UseVisualStyleBackColor = $true
$PopupForm.AcceptButton = $PopupColse
$PopupForm.CancelButton = $PopupColse
#~~< PopupHeader >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$PopupHeader = New-Object System.Windows.Forms.Label
$PopupHeader.Font = New-Object System.Drawing.Font("Calibri", 15.75, ([System.Drawing.FontStyle]([System.Drawing.FontStyle]::Bold -bor [System.Drawing.FontStyle]::Italic)), [System.Drawing.GraphicsUnit]::Point, ([System.Byte](0)))
$PopupHeader.Location = New-Object System.Drawing.Point(137, 9)
$PopupHeader.Size = New-Object System.Drawing.Size(104, 23)
$PopupHeader.TabIndex = 2
$PopupHeader.Text = $PopupTitle
$PopupHeader.TextAlign = [System.Drawing.ContentAlignment]::MiddleCenter
#~~< PopUpTextArea >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$PopUpTextArea = New-Object System.Windows.Forms.Label
$PopUpTextArea.Anchor = ([System.Windows.Forms.AnchorStyles]([System.Windows.Forms.AnchorStyles]::Top -bor [System.Windows.Forms.AnchorStyles]::Bottom -bor [System.Windows.Forms.AnchorStyles]::Left -bor [System.Windows.Forms.AnchorStyles]::Right))
$PopUpTextArea.Location = New-Object System.Drawing.Point(12, 15)
$PopUpTextArea.Size = New-Object System.Drawing.Size(357, 265)
$PopUpTextArea.TabIndex = 1
$PopUpTextArea.Text = $PopupText
$PopUpTextArea.TextAlign = [System.Drawing.ContentAlignment]::MiddleLeft
$PopupForm.Controls.Add($PopupHeader)
$PopupForm.Controls.Add($PopUpTextArea)
$PopupForm.Controls.Add($PopupColse)
# Show Form
$PopupForm.Add_Shown({$PopupForm.Activate()})
[void]$PopupForm.showdialog()
}
function Show-About( $object ){
# Function Opens the About Page
$AboutText = @("
Script Title: Remote Computer Inventory`n
Script Author: Assaf Miron`n
Script Description: Collects Remote Computer Data Using WMI and Registry Access Outputs all information to a Data Grid Form and to a CSV Log File.`n
Log File Name: $LogFile")
Show-Popup -PopupTitle "About" -PopupText $AboutText
}
function Show-HowTo( $object ){
# Function Opens the Help Page
$HowToText = @("
1. Click on the Browse Button and select a TXT or a CSV File Containing Computer Names`n
2. After File is Selected click on the Run Button.`n
3. You will see a Notify Icon with the Coresponding Text.`n
4. The Script has begon collecting Remote Computer Inventory!`n
`nWhen The script is Done you will see a Popup Message and all data will be presented in the DataGrid.`n
** Because Poweshell works only in MTA mode there is no Option Copying the Data off the DataGrid...`n
5. All Data will be Exported to a Log File Located Here: $LogFile")
Show-Popup -PopupTitle "How To?" -PopupText $HowToText
}
function CloseForm($object)
# Function End the Program
{
$Form1.Close()
}
function RunScript($object)
# Function Runs the Program and starts collecting data
{
# Create an Array of Computers Enterd in the Input File
$arrComputers = Get-Content -path $textBox1.Text -encoding UTF8
# Create an Array to Keep all Computers Objects
$AllComputers = @()
# Init the Progress bar to it's Maximum Value
if(($arrComputers -is [array]) -eq $FALSE) { $ProgressBar1.Maximum = 1 }
else { $ProgressBar1.Maximum = $arrComputers.Count }
$ProgressBar1.Minimum = 0
$ProgressBar1.Value = 0
$ProgressBar1.Step = 1 # Define the Progress bar Step value
# Scan all Computers in the Array $arrComputers
foreach ($strComputer in $arrComputers)
{
# Uses the Ping Command to check if the Computer is Alive
if($Ping1.Send($strComputer).Status -eq "Success"){
Show-NotifyIcon -Title "Retriving Computer Information" -Text "Scanning $strComputer For Hardware Data"
# Collect Computer Details from Win32_computersystem Using WMI
$ComputerDet = Get-WMIItem -Class "Win32_computersystem" -RemoteComputer $strComputer -Item Caption,Domain,SystemType,Manufacturer,Model,NumberOfProcessors,TotalPhysicalMemory,UserName
if($ComputerDet.Caption.Length -gt 1) # Check to See if Any data was Collected at all
{
#region Total Memory Formating
# Check Total Physical Memory Size and Format it acourdingly
if($ComputerDet.TotalPhysicalMemory -ge 1GB){
$ComputerDet.TotalPhysicalMemory = ($ComputerDet.TotalPhysicalMemory/1GB).Tostring("# GB")} # Format to GB
else {$ComputerDet.TotalPhysicalMemory = ($ComputerDet.TotalPhysicalMemory/1MB).Tostring("# MB")} # Format to MB
#endregion
#region CPU Name
# Collect CPU Name Using WMI
$CPUName = Get-WMIItem -Class "Win32_Processor" -RemoteComputer $strComputer -Item Name
# CPU Names Can Contain Multiple Values, in Order to Insert Them into the DataGridView I Divde them to String with ";" Seperators
$arrCPUNames = @()
foreach($CPU in $CPUName){
$arrCPUNames = $CPU.Name.Trim()+";"+$arrCPUNames # the Sting of the CPU Name has White Space in The Begining - Trim It
}
#endregion
#region Operating System Data
# Collect Operating System and Service Pack Information Usin WMI
$OS = Get-WMIItem -Class "win32_operatingsystem" -RemoteComputer $strComputer -Item Caption,csdversion
#endregion
#region Chassis Type
# Collect Machine Chassis Using WMI
$ChassisType = Get-WMIItem -Class Win32_SystemEnclosure -RemoteComputer $strComputer -Item ChassisTypes
# Select Machine Chassis
switch ($ChassisType.ChassisTypes) {
1 {$ChassisType = "Other"}
2 {$ChassisType = "Unknown"}
3 {$ChassisType = "Desktop"}
4 {$ChassisType = "Low Profile Desktop"}
5 {$ChassisType = "Pizza Box"}
6 {$ChassisType = "Mini Tower"}
7 {$ChassisType = "Tower"}
8 {$ChassisType = "Portable"}
9 {$ChassisType = "Laptop"}
10 {$ChassisType = "Notebook"}
11 {$ChassisType = "Handheld"}
12 {$ChassisType = "Docking Station"}
13 {$ChassisType = "All-in-One"}
14 {$ChassisType = "Sub-Notebook"}
15 {$ChassisType = "Space Saving"}
16 {$ChassisType = "Lunch Box"}
17 {$ChassisType = "Main System Chassis"}
18 {$ChassisType = "Expansion Chassis"}
19 {$ChassisType = "Sub-Chassis"}
20 {$ChassisType = "Bus Expansion Chassis"}
21 {$ChassisType = "Peripheral Chassis"}
22 {$ChassisType = "Storage Chassis"}
23 {$ChassisType = "Rack Mount Chassis"}
24 {$ChassisType = "Sealed- PC"}
default {$ChassisType = "Unknown"}
}
#endregion
#region Automatic Updates
# Collect the Automatic Updates Options Using Registry Access
$AUOptions = Get-Reg -Hive LocalMachine -Key "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" -Value "AUOptions"
# Collect the Automatic Updates Install Day Using Registry Access
$AUDay = Get-Reg -Hive LocalMachine -Key "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" -Value "ScheduledInstallDay"
# Collect the Automatic Updates Install Time Using Registry Access
$AUTime = Get-Reg -Hive LocalMachine -Key "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" -Value "ScheduledInstallTime"
if($AUOptions -eq $null){ # Automatic Updates is defined in Group Policy
$AUOptions = Get-Reg -Hive LocalMachine -Key "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Value "AUOptions"
$AUDay = Get-Reg -Hive LocalMachine -Key "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Value "ScheduledInstallDay"
$AUTime = Get-Reg -Hive LocalMachine -Key "SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Value "ScheduledInstallTime"
}
switch ($AUOptions){ # Check Wich Automatic Update Option is Selected
1 {$AUClient = "Automatic Updates is Turnd off."}
2 {$AUClient = "Notify for download and notify for install "}
3 {$AUClient = "Auto download and notify for install "}
4 {
switch ($AUDay) # Check on What day the Automatic Update Installs
{
0 {$InstDay = "Every Day"}
1 {$InstDay = "Sunday"}
2 {$InstDay = "Monday"}
3 {$InstDay = "Tuesday"}
4 {$InstDay = "Wensday"}
5 {$InstDay = "Thursday"}
6 {$InstDay = "Friday"}
7 {$InstDay = "Saturday"}
}
# Check on What time the Automatic Update Installs
if ($AUTime -le 12) { $AUTime = $AUTime.ToString() + " AM" } else { $AUTime = ($AUTime -12) + " PM" }
$AUClient = "Auto download and schedule the install - "+$InstDay+" "+$AUTime}
Defualt {"Automatic Updates is not Set."} # No setting Collected
}
#endregion
#region Computer Total Health
# Collect Avialable Memory with WMI
$AvialableMem = Get-WMIItem -Class "Win32_PerfFormattedData_PerfOS_Memory" -RemoteComputer $strComputer -Item "AvailableMBytes"
# Collect Disk Queue,Queue Length, Processor time Data Using WMI
$DiskQueue = Get-WMIItem -Class "Win32_PerfFormattedData_PerfDisk_LogicalDisk" -RemoteComputer $strComputer -Item CurrentDiskQueueLength
$QueueLength = Get-WMIItem -Class "Win32_PerfFormattedData_PerfNet_ServerWorkQueues" -RemoteComputer $strComputer -Item QueueLength
$Processor = Get-WMIItem -Class "Win32_PerfFormattedData_PerfOS_Processor" -RemoteComputer $strComputer -Item PercentProcessorTime
$intHealth = 0 # integer for Collecting Computer Total Health
# Using the Avialable Memory to Check Computer Totla Health
if($AvialableMem.AvailableMBytes -lt 4) { $intHealth += 1; $strHealth += "Low Free Memory;" }
# Using Current Disk Queue Length to Check Computer Total Health
if($DiskQueue.CurrentDiskQueueLength -gt 2) { $intHealth += 1; $strHealth += "High Disk Queue;" }
# Using Queue Length to Check Computer Total Health
if($QueueLength.QueueLength -gt 4) { $intHealth += 1; $strHealth += "Long Disk Queue;" }
# Using Processor Time(%) to Check Computer Total Health
if($Processor.PercentProcessorTime -gt 90) { $intHealth += 1; $strHealth += "Processor Usage Over 90%;" }
# If the integer is Bigger than 1 so the computer is Unhealthy, Describe Computer Problems
# Else The Computer is Healthy
if($intHealth -gt 1) { $ComputerTotalHealth = "UnHealthy, " + $strHealth } else { $ComputerTotalHealth = "Healthy" }
#endregion
#region Avialable Memory Formating
# Format Avialable Memory MB
$AvialableMem.AvailableMBytes = $AvialableMem.AvailableMBytes.ToString("# MB")
#endregion
#region Disk Drive Info
# Collect Disk Drive Information Using WMI
$DriveInfo = Get-WMIItem -Class "Win32_LogicalDisk" -RemoteComputer $strComputer -Item Caption,Size,FreeSpace
# Format Every Drive Size and Free Space
foreach($DRSize in $DriveInfo)
{ # Check Object Size and Format Acourdingly
if($DRSize.Size -ge 1GB){
$DRSize.Size = ($DRSize.Size/1GB).ToString("# GB") } # Format to GB
else { $DRSize.Size = ($DRSize.Size/1MB).ToString("# MB") } # Format to MB
if($DRSize.FreeSpace -ge 1GB){
$DRSize.FreeSpace = ($DRSize.FreeSpace/1GB).ToString("# GB") } # Format to GB
else { $DRSize.FreeSpace = ($DRSize.FreeSpace/1MB).ToString("# MB") } # Format to MB
}
# Disk Drives Can Contain Multiple Values, in Order to Insert Them into the DataGridView I divide them to Strings with ";" Seperators
$arrDiskDrives = @()
$arrDiskSize = @()
$arrDiskFreeSpace = @()
foreach($Drive in $DriveInfo){
$arrDiskDrives = $Drive.Caption+";"+$arrDiskDrives
$arrDiskSize = $Drive.Size+";"+$arrDiskSize
$arrDiskFreeSpace = $Drive.FreeSpace+";"+$arrDiskFreeSpace
}
#endregion
#region IP Addresses
# Collect IPAddresses Using WMI, Filter only Enabled IPs
$IPAddress = Get-WmiItem -Class "Win32_NetworkAdapterConfiguration" -Filter "IPEnabled = True" -RemoteComputer $strComputer -Item IPAddress
# IPAddress Can Contain Multiple Values, in Order to Insert Them into the DataGridView I divide them to Strings with ";" Seperators
$arrIPAddress = @()
foreach($IP in $IPAddress){
$arrIPAddress = $IP.IPAddress[0]+";"+$arrIPAddress
}
#endregion
#region Time Zone
# Collect Time Zone Information Using WMI
$TimeZone = Get-WMIItem -Class "Win32_TimeZone" -RemoteComputer $strComputer -Item Bias,StandardName
$TimeZone.Bias = $TimeZone.Bias/60
#endregion
#region System Restore Status
# Collect System Restore Information Using Remote Registry
$SysRestoreStatus = Get-Reg -Hive LocalMachine -RemoteComputer $strComputer -Key "SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" -Value "DisableSR"
if ($SysRestoreStatus -eq 0) { $SysRestoreStatus = "Enabled" } else { $SysRestoreStatus = "Disabled" }
#endregion
#region Offline Files Status
# Collect Offline Files Information Using Remote Registry
$OfflineFolStatus = Get-Reg -Hive LocalMachine -RemoteComputer $strComputer -Key "SOFTWARE\Microsoft\Windows\CurrentVersion\NetCache" -Value "Enabled"
if ($OfflineFolStatus -eq 1) { $OfflineFolStatus = "Enabled" } else { $OfflineFolStatus = "Disabled" }
#endregion
#region Printers
# Collect Printers Information Using WMI
$Printers = Get-WMIItem -Class "Win32_Printer" -RemoteComputer $strComputer -Item Name,PortName,Caption
# Printers Contain Multiple Values, in Order to Insert Them into the DataGridView I divide them to Strings with ";" Seperators
$arrPrinters = @()
foreach($Printer in $Printers){
$arrPrinters = $Printer.Name+"("+$Printer.PortName+");"+$arrPrinters
}
#endregion
#region BIOS Serial Number
# Collect BIOS Serial Number Using WMI
$BIOSSN = Get-WMIItem -Class "Win32_Bios" -RemoteComputer $strComputer -Item SerialNumber
#endregion
#region Network Drives
# Collect Network Drives Using WMI
$NetDrives = Get-WMIItem -Query "Select * From Win32_LogicalDisk Where DriveType = 4" -RemoteComputer $strComputer -Item DeviceID,ProviderName
# Network Drives Contain Multiple Values, in Order to Insert Them into the DataGridView I divide them to Strings with ";" Seperators
$arrNetDrives = @()
foreach($NetDrive in $NetDrives){
$arrNetDrives = $NetDrive.DeviceID+"("+$NetDrive.ProviderName+");"+$arrNetDrives
}
#endregion
#region Anti-Virus Client Data
# Collect Anti-Virus Info Using Remote Registry
$AVParentServer = Get-Reg -Hive LocalMachine -RemoteComputer $strComputer -Key "SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion" -Value "Parent"
# Read the Anti-Virus Virus Definition File and Format it to an actual Date
$VirusDefFile = "C:\Program Files\Common Files\Symantec Shared\VirusDefs\definfo.dat"
If(Test-Path $VirusDefFile){
$AVDefs = Get-Content $VirusDefFile | where { $_ -match "CurDefs" }
$AVDefs = $AVDefs.Substring(8)
$AVDefs = [datetime]($AVDefs.Substring(5,1) + "/" + $AVDefs.Substring(6,2) + "/" + $AVDefs.substring(0,4))
}
Else { $AVDefs = "" }
#endregion
#region Operating Systems Hotfixes
# Collect all Hotfix Information Using WMI
$HotFixes = Get-WMIItem -Class "Win32_QuickFixEngineering" -RemoteComputer $strComputer -Item Description,HotFixID,ServicePackInEffect
# HotFixes Contain Multiple Values, in Order to Insert Them into the DataGridView I divide them to Strings with ";" Seperators
$arrHotFixes = @()
foreach($Fix in $HotFixes){
if($Fix.Description -eq ""){
if($Fix.HotFixID -eq "File 1"){ $arrHotFixes = $Fix.ServicePackInEffect+";"+$arrHotFixes }
else { $arrHotFixes =$Fix.HotFixID+";"+$arrHotFixes }
}
else { $arrHotFixes = $Fix.Description+";"+$arrHotFixes }
}
#endRegion
#region Remote Desktop Status
# Collect Remote Desktop Protocol Status Using Remote Registry
$RDPStatus = Get-Reg -Hive LocalMachine -remoteComputer $strComputer -Key "SYSTEM\CurrentControlSet\Control\Terminal Server" -Value "fAllowToGetHelp"
if($RDPStatus -eq 0) {$RDPStatus = "Enabled" } else {$RDPStatus = "Disabled" }
#endregion
#region Remote Assistance Status
# Collect Remote Assistance Status Using Remote Registry
$RAStatus = Get-Reg -Hive LocalMachine -remoteComputer $strComputer -Key "SYSTEM\CurrentControlSet\Control\Terminal Server" -Value "fDenyTSConnections"
if($RAStatus -eq 1) {$RAStatus = "Enabled" } else {$RAStatus = "Disabled" }
#endregion
# Change the Notify Icon to Show Exporting Text
Show-NotifyIcon -Text "Exporting $strComputer Information" -Title "Exporting..."
#region Check the Null Valued Paramters
# If one of the Parameters are Null, Enter Space (looks better in the Table)
if($ComputerDet -eq $Null){ $ComputerDet = " " }
if($ChassisType -eq $Null){ $ChassisType = " " }
if($BIOSSN -eq $Null){ $BIOSSN = " " }
if($CPUName -eq $Null){ $CPUName = " " }
if($AvialableMem -eq $Null){ $AvialableMem = " " }
if($OS -eq $Null){ $OS = " " }
if($SP -eq $Null){ $SP = " " }
if($IPAddress -eq $Null){ $IPAddress = " " }
if($HotFixes -eq $Null){ $HotFixes = " " }
if($arrDiskDrives -eq $Null){ $arrDiskDrives=" " }
if($arrDiskFreeSpace -eq $Null){ $arrDiskFreeSpace=" " }
if($arrDiskSize -eq $Null){ $arrDiskSize=" " }
if($RDPStatus -eq $Null){ $RDPStatus = " " }
if($RAStatus -eq $Null){ $RAStatus = " " }
if($AUClient -eq $Null){ $AUClient = " " }
if($AVParentServer -eq $Null){ $AVParentServer = " " }
if($AVDefs -eq $Null){ $AVDefs = " " }
if($Printers -eq $Null){ $Printers = " " }
if($ComputerTotalHealth -eq $Null){ $ComputerTotalHealth = " " }
#endregion
#region Creating the Data Object - $DataObject
# Create an Empty psObject, $DataObjcet - Used by this Name in the Join-Data Function
$DataObject = New-Object psobject
# Join all the Data to the DataObject
$ComputerDet | Join-Data # Contians Multiple Values, No need to Define a Name
$ChassisType | Join-Data -objName "Chassis Type" # String with no Values - Define a Name
$BIOSSN | Join-Data # Contians Multiple Values, No need to Define a Name
$CPUName | Join-Data # Contians Multiple Values, No need to Define a Name
$AvialableMem | Join-Data # Contians Multiple Values, No need to Define a Name
$OS.Caption | Join-Data -objName "Operating System" # Contians Multiple Values, Caption Value canot be overwritten - Define a Name to a certian Value
$OS.CsdVersion | Join-Data -objName "Service Pack" # String with no Values - Define a Name
$arrIPAddress | Join-Data -objName "IP Addresses" # String with no Values - Define a Name
$arrHotFixes| Join-Data -objName "HotFixes" # String with no Values - Define a Name
$arrDiskDrives| Join-Data -objName "Disk Drives" # String with no Values - Define a Name
$RDPStatus.ToString() | Join-Data -objName "Remote Desktop" # String with no Values - Define a Name
$RAStatus.ToString() | Join-Data -objName "Remote Assistance" # String with no Values - Define a Name
$AUClient | Join-Data -objName "Automatic Updates" # String with no Values - Define a Name
$AVParentServer | Join-Data -objName "Anti-Virus Server" # String with no Values - Define a Name
$AVDefs | Join-Data -objName "Anti-Virus Defs" # String with no Values - Define a Name
$arrPrinters | Join-Data -objName "Printers" # String with no Values - Define a Name
$ComputerTotalHealth | Join-Data -objName "Computer Totla Health" # String with no Values - Define a Name
#endregion
$AllComputers += $DataObject
#region Exporting data
# Export the DataObject to the DataGridView Using the out-DataTable
$DataTable = $AllComputers | out-dataTable
# Define Data Grid's Data Source to the DataTable we Created
$DataGridView1.DataSource = $DataTable.psObject.baseobject
$DataGridView1.Refresh() # Refresh the Table View in order to View the new lines
# Export all the Data to the Log File
$AllComputers | Export-Csv -Encoding OEM -Path $LogFile
#endregion
}
}
else { # No Ping to Computer
$objNotifyIcon.BalloonTipIcon = "Error"
Show-NotifyIcon -Title "$strComputer is not avialable" -Text "No Ping to $strComputer.`nNo Data was Collected"
$objNotifyIcon.BalloonTipIcon = "Info"
}
$ProgressBar1.PerformStep()
}
#region Finishing - Script is Done
# Assign an Icon and Icon Type For the NotifyIcon Object
$objNotifyIcon.Icon = "D:\Assaf\Scripts\Icons\XP\people5.ico"
$objNotifyIcon.BalloonTipIcon = "Info"
# Pop Up a Message box
$MSGObject = new-object -comobject wscript.shell
$MSGResult = $MSGObject.popup("Script Has Finished Running!",0,"I'm Done",0)
# Show Notify Icon with Finishing Text
$objNotifyIcon.BalloonTipText = "Done!`nFile Saved in "+$LogFile
$objNotifyIcon.Visible = $TRUE
$objNotifyIcon.ShowBalloonTip(10000)
$objNotifyIcon.Visible = $FALSE # Set to False so that the Notify Icon will Disapear after the Script is Done
#endregion
}
Main # This call must remain below all other event functions
#endregion
</code></pre>
</div>
<!-- sidebar? -->
</div>
<hr>
<footer class="blog-footer">
<p>Generated by Joel "Jaykul" Bennett - 2018</p>
</footer>
</div> <!-- /container -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<script src="/js/main.js"></script>
<script src="/js/vendor/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-59988721-1', 'auto');
ga('send', 'pageview');
$(function () {
$('#contentTabs a:first').tab('show')
})
</script>
</body>
</html>