-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathVerifyBuild.ps1
More file actions
88 lines (74 loc) · 2.62 KB
/
VerifyBuild.ps1
File metadata and controls
88 lines (74 loc) · 2.62 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
#*******************************************************************************
# Author: Mick Pletcher
# Date: 25 November 2013
#
# Program: Check Build
#*******************************************************************************
Clear-Host
#Declare Global Memory
$app = ,@()
Set-Variable -Name Count -Scope Global -Value 1 -Force
Set-Variable -Name OS -Scope Global -Force
Set-Variable -Name RelativePath -Scope Global -Force
Function RenameWindow ($Title) {
#Declare Local Memory
Set-Variable -Name a -Scope Local -Force
$a = (Get-Host).UI.RawUI
$a.WindowTitle = $Title
#Cleanup Local Memory
Remove-Variable -Name a -Scope Local -Force
}
Function AppInstalled($Description) {
#Declare Local Memory
Set-Variable -Name AppName -Scope Local -Force
Set-Variable -Name AppLocal -Scope Local -Force
Set-Variable -Name Desc -Scope Local -Force
Set-Variable -Name Output -Scope Local -Force
$object = New-Object -TypeName PSObject
#Change '%application%' to whatever app you are calling
$Desc = [char]34+"description like"+[char]32+[char]39+[char]37+$Description+[char]37+[char]39+[char]34
$Output = wmic product where $Desc get Description
$Output | ForEach-Object {
$_ = $_.Trim()
if(($_ -ne "Description")-and($_ -ne "")){
$AppName = $_
}
}
$AppLocal = New-Object System.Object
$AppLocal | Add-Member -type NoteProperty -name Application -value $Description
If ($AppName -ne $null) {
#$Global:app+=,@($Description,"Installed")
$AppLocal | Add-Member -type NoteProperty -name Status -value "Installed"
} else {
#$Global:app+=,@($Description,"Not Installed")
$AppLocal | Add-Member -type NoteProperty -name Status -value "Not Installed"
}
$Global:app += $AppLocal
$AppLocal | Select Application
$Global:Count++
#Cleanup Local Memory
Remove-Variable -Name AppName -Scope Local -Force
Remove-Variable -Name AppLocal -Scope Local -Force
Remove-Variable -Name Desc -Scope Local -Force
Remove-Variable -Name Output -Scope Local -Force
}
cls
Write-Host "Processing Applications"
Write-Host
RenameWindow "Check Build Installs"
AppInstalled "Dell Client System Update"
AppInstalled "Adobe Reader"
AppInstalled "Microsoft Lync"
AppInstalled "Remote Desktop"
AppInstalled "Interactive Admin"
AppInstalled "RunAs Admin"
AppInstalled "Windows Backup"
cls
Write-Host "Installation Report"
Write-Host
$app | Format-Table
#Cleanup Global Memory
$app.Clear()
Remove-Variable -Name Count -Scope Global -Force
Remove-Variable -Name OS -Scope Global -Force
Remove-Variable -Name RelativePath -Scope Global -Force