11
2+ # ########################################################### Start Windows Defender Exclusions
3+
4+ Add-MpPreference - ExclusionPath $ElasticInstallPath
5+ Add-MpPreference - ExclusionPath $ElasticDataPath
6+ Add-MpPreference - ExclusionPath $MongoDbPath
7+ Add-MpPreference - ExclusionPath $ClientFolder
8+ Add-MpPreference - ExclusionPath $MainFolder
9+
10+ Set-MpPreference - DisableRealtimeMonitoring $true
11+
12+
13+ # To remove Windows Defender
14+ # Remove-WindowsFeature Windows-Defender, Windows-Defender-GUI
15+ # ########################################################### End Windows Defender Exclusions
16+
17+
18+ # ########################################################### MongoDB Start
219
320# MongoDB variables - Download the Community edition
421$MongoDbPath = " E:\MongoDB"
522
623$MongoMajorVersion = " 7.0" # Used in path
724$MongoMinorVersion = " 14"
825$MongoDbVersion = " $MongoMajorVersion .$MongoMinorVersion "
9- $UnzippedFolderName = " mongodb-win32-x86_64-windows-$MongoDbVersion "
1026$MongoMsiFilename = " mongodb-windows-x86_64-$MongoDbVersion -signed.msi"
1127$MongoDownloadURL = " https://fastdl.mongodb.org/windows/$MongoMsiFilename "
1228$MongoDbConnectionString = " mongodb://localhost:27017/${CatalogDatabaseName} "
1329$MongoShellFilename = " mongosh-2.3.2-x64.msi"
1430$MongoShellDownloadURL = " https://downloads.mongodb.com/compass/$MongoShellFilename "
1531
1632
17- # ########################################################### MongoDB Start
1833# Check if mongo is already installed
1934if ((Test-Path - path $MongoDbPath ) -eq $True )
2035{
@@ -39,7 +54,7 @@ Write-Host "Downloading mongo complete."
3954
4055
4156# ####### New - Use the MSI to install MongoDB Server
42- msiexec.exe / l* v mdbinstall.log / qb / i $mongoDbMsiFile INSTALLLOCATION= " $MongoDbPath \Server\5.0 \" ADDLOCAL= " ServerService"
57+ msiexec.exe / l* v mdbinstall.log / qb / i $mongoDbMsiFile INSTALLLOCATION= " $MongoDbPath \Server\$MongoMajorVersion \" ADDLOCAL= " ServerService"
4358
4459# Loop and wait for the service to start
4560$limit = (Get-Date ).AddMinutes(5 )
0 commit comments