-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServer_Validation_Final.ps1
More file actions
306 lines (276 loc) · 11.1 KB
/
Server_Validation_Final.ps1
File metadata and controls
306 lines (276 loc) · 11.1 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
Write-Host "";
Write-Host " ===== VDA Validation is starting ====="
Write-Host "";
# Check if Microsoft Visual Studio 2017 is installed
$vs2017 = Get-ItemProperty -path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7" -name "15.0" -ErrorAction SilentlyContinue
if (-not $vs2017) {
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please install Microsoft Visual Studio 2017"
Write-Host "";
}
else {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: Visual studio 2017 is Installed"
Write-Host "";
}
#Check if Visual studio 2017 is the default compiler
$compiler = select-string -path "C:\ProgramData\Runtime.config.xml" -Pattern "msdev2017.config.xml"
if (-not $compiler) {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please change the compiler version on Professional settings "
Write-Host "";
}
else {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: Compiler version is VS 2017"
Write-Host "";
}
# Check if the registry key "HKEY_CURRENT_USER\SOFTWARE\some\some1\RunMachineSelection" exists and has data
$regKey = Get-ItemProperty -path "Registry::HKEY_CURRENT_USER\Software\RunMachineSelection" -Name "Details" -ErrorAction SilentlyContinue
if (-not $regKey) {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please add the PPC machines to the GPOs"
Write-Host "";
}
else {
Write-Host "";
Write-Host -ForegroundColor Yellow -NoNewline " Warning: PPC machines are setup, but verify the name is correct and CPU details as ACL describes"
Write-Host "";
}
# Check if the file c:\programdata\software\suite\system.config contains the word "TempData"
#$file = Get-Content "C:\ProgramData\Suite\\System.config.xml"
$sysconfg1 = select-string -path "C:\ProgramData\System.config.xml" -Pattern "TempData"
if ($sysconfg1 -notmatch "TempData") {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please update system.config tmp folder under C:\ProgramData\Suite\System.config.xml "
Write-Host "";
}
else {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: System.config file has tmp folder configurated!"
Write-Host "";
}
$sysconfg2 = select-string -path "C:\ProgramData\System.config.xml" -Pattern "false"
if ($sysconfg2 -notmatch "false") {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please update interactive-mode to false under C:\ProgramData\Suite\System.config.xml "
Write-Host "";
}
else {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: System config interactive-mode is setup!"
Write-Host "";
}
$guixml = select-string -path "C:\ProgramData\config.xml" -Pattern "false"
if ($guixml -notmatch "false") {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please update ShowHomepage to false under C:\ProgramData\config.xml "
Write-Host "";
}
else {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: GUI Home Page is disabled"
Write-Host "";
}
#Validate if Web Certicate is installed
$Cert = Get-ChildItem Cert:\LocalMachine\Root | Where-Object { $_.Issuer -like "*IWKS*" }
if ($Cert) {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: Webserver certificate is installed"
Write-Host "";
} else {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please install Webserver certificate "
Write-Host "";
}
#Checking if web is added to trusted sites
$IESet = (get-item "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMapKey").property | select-string ""
if ($IESet) {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: -web is set as a Trusted Sites zone"
Write-Host "";
} else {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please add -web url to the Trusted site zone via GPO "
Write-Host "";
}
# Check if 7zip is installed
$zipPath = "C:\Program Files\7-Zip\7z.exe"
if (Test-Path $zipPath) {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: 7-Zip is Installed"
Write-Host "";
} else {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Install 7-ZIP "
Write-Host "";
}
# Check if Notepad++ is installed
$nppPath = "C:\Program Files\Notepad++\notepad++.exe"
if (Test-Path $nppPath) {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: Notepad++ is Installed"
Write-Host "";
} else {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Install Notepad++ "
Write-Host "";
}
# Check if Adobe Reader is installed
$adobePath = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe" -ErrorAction SilentlyContinue).Path
if ($adobePath) {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: Adobe is Installed"
Write-Host -NoNewline " ";
} else {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Install Adobe "
Write-Host "";
}
#Check if excel is installed
$excelPath = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe" -ErrorAction SilentlyContinue).'(default)'
if ($excelPath) {
$excelVersion = (Get-Item $excelPath).VersionInfo.ProductVersion
Write-Host "";
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: Excel is installed, version $excelVersion"
Write-Host "";
} else {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Excel is not installed."
Write-Host "";
}
#Check if excel reporting is installed
$excelReporting = "C:\Program Files\Suite\Excel Reporting"
if (Test-Path $excelReporting -PathType Container) {
Write-Host "";
Write-Host -ForegroundColor Green -NoNewline " PASS: Excel Plugin is Installed"
Write-Host
} else {
Write-Host "";
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please install Excel plugin if required "
Write-Host
}
#Check if Google chrome is installed
if (Test-Path "$env:LOCALAPPDATA\Google\Chrome\Application\chrome.exe") {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: Google Chrome is installed on User directory"
Write-Host
}
else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please install Google Chrome"
Write-Host
}
#Check if Google chrome is installed
if (Test-Path "C:\Program Files\Google\Chrome\Application\chrome.exe") {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: Google Chrome is installed "
Write-Host
}
else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please install Google Chrome"
Write-Host
}
#check if SSMS is installed
$ssmsInstallDir = "$env:ProgramFiles (x86)\Microsoft SQL Server Management Studio 18"
if (Test-Path $ssmsInstallDir) {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: SQL Server Management Studio is installed"
Write-Host
} else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Please install SQL Server Management Studio"
Write-Host
}
$xpsViewer = "$env:ProgramFiles\Windows Photo Viewer\ImagingDevices.exe"
if (Test-Path $xpsViewer) {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: XPS viewer is installed"
Write-Host
} else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: XPS Viewer not installed"
Write-Host
}
try {
$socket = New-Object System.Net.Sockets.TcpClient('localhost',445)
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: Telnet is Installed"
Write-Host
$socket.Close()
} catch {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Telnet not installed"
Write-Host
}
if (Get-Module -ListAvailable -Name sqlserver) {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: SQL server module is installed"
Write-Host
} else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: SQL Server module not installed"
Write-Host
}
#RSAT-AD Installed and having and Identity attached
$featureName = "RSAT-AD-Powershell"
$feature = Get-WindowsFeature $featureName -ErrorAction SilentlyContinue
if ($feature ) {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: '$featureName' is installed"
Write-Host
if ($feature.Identity) {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: '$featureName' feature has the following identity: $($feature.Identity)"
Write-Host
}
else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: '$featureName' feature is installed but test the SVC account."
Write-Host
}
}
else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: '$featureName' feature is not installed or is not enabled."
Write-Host
}
$agentKeyPath = (Get-Itemproperty -path HKLM:\SOFTWARE\VirtualDesktopAgent -Name ListOfDDCs -ErrorAction SilentlyContinue)
if ($agentKeyPath) {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: DDCs are configured."
Write-Host
} else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: DDCs are not configured."
Write-Host
}
$Cvda = Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "* Virtual Desktop*"} -ErrorAction SilentlyContinue
if ($Cvda) {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: Virtual Delivery Agent is installed "
Write-Host
}
else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Virtual Delivery Agent is not installed."
Write-Host
}
$firewallStatus = Get-NetFirewallProfile | Select-Object -ExpandProperty enabled
if ($firewallStatus -eq "False") {
Write-Host
Write-Host -ForegroundColor Green -NoNewline " PASS: Windows firewall is disabled "
Write-Host
}
else {
Write-Host
Write-Host -ForegroundColor Red -BackgroundColor Yellow -NoNewline " ERROR: Windows firewall is Enabled"
Write-Host
}
# Retrieve a list of software with the name ""
Write-Host
Write-Host -ForegroundColor Green -NoNewline "`n Suite software Installed with Versions:"
Write-Host
Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "**"} -ErrorAction SilentlyContinue | Select-Object Name, Version | Out-Host -Paging
pause