Nick Panaccio
11/18/2024, 7:14 PMPaul Brown
11/18/2024, 8:22 PMNick Panaccio
11/18/2024, 9:00 PMPaul Brown
11/18/2024, 9:02 PMBrandon Mitchell
11/18/2024, 10:02 PMNick Panaccio
11/19/2024, 11:11 AMBrandon Mitchell
11/19/2024, 11:56 AMBrandon Mitchell
11/19/2024, 12:19 PM# PowerShell Wrapper for MDT, Standalone and Chocolatey Installation - (C)2015 xenappblog.com
# Example 1: Start-Process "XenDesktopServerSetup.exe" -ArgumentList $unattendedArgs -Wait -Passthru
# Example 2 Powershell: Start-Process powershell.exe -ExecutionPolicy bypass -file $Destination
# Example 3 EXE (Always use ' '):
# $UnattendedArgs='/qn'
# (Start-Process "$PackageName.$InstallerType" $UnattendedArgs -Wait -Passthru).ExitCode
# Example 4 MSI (Always use " "):
# $UnattendedArgs = "/i $PackageName.$InstallerType ALLUSERS=1 /qn /liewa $LogApp"
# (Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode
Write-Verbose "Setting Arguments" -Verbose
$StartDTM = (Get-Date)
$Vendor = "CrowdStrike"
$Product = "Windows Sensor"
$PackageName = "WindowsSensor"
$Version = "7.17.18721"
$InstallerType = "exe"
$LogPS = "${env:SystemRoot}" + "\Temp\$Vendor $Product $Version PS Wrapper.log"
$LogApp = "${env:SystemRoot}" + "\Temp\$PackageName.log"
$Destination = "${env:ChocoRepository}" + "\$Vendor\$Product\$Version\$packageName.$installerType"
$UnattendedArgs = '/install /quiet /norestart CID=<redacted> VDI=1'
$env:SEE_MASK_NOZONECHECKS = 1
$lfodown01 = @(
"13.56.121.58",
"50.18.198.237",
"52.8.141.1",
"54.67.4.108",
"54.67.5.136",
"54.67.17.131",
"54.67.24.156",
"54.67.41.192",
"54.67.51.32",
"54.67.72.218",
"54.67.78.134",
"54.67.108.17",
"54.67.114.188",
"54.67.122.238",
"54.183.120.141",
"54.183.135.80",
"54.183.215.154",
"54.193.86.245",
"54.215.170.42",
"54.219.179.25",
"54.241.161.242",
"54.241.181.78",
"54.241.182.78",
"54.241.183.151",
"54.241.183.229",
"54.241.183.232"
)
Start-Transcript $LogPS
Set-Location $Version
Write-Verbose "Starting Installation of $Vendor $Product $Version" -Verbose
(Start-Process "$PackageName.$InstallerType" $UnattendedArgs -Wait -Passthru).ExitCode
Write-Verbose "Customization" -Verbose
Do {
$NetTCPConnections = Get-NetTCPConnection
} until ($null -ne ($lfodown01 | ? { $NetTCPConnections -match $_ }) -eq $true)
Do {
$NetTCPConnections = Get-NetTCPConnection
} until ($null -ne ($lfodown01 | ? { $NetTCPConnections -match $_ }) -eq $false)
Remove-ItemProperty -Path "HKLM:\SYSTEM\CrowdStrike\{9b03c1d9-3138-44ed-9fae-d9f4c034b88d}\{16e0423f-7058-48c9-a204-725362b67639}\Default" -Name "AG" -Force
Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\services\CSAgent\Sim" -Name "AG" -Force
Start-Sleep -Seconds 300
Write-Verbose "Stop logging" -Verbose
$EndDTM = (Get-Date)
Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalSeconds) Seconds" -Verbose
Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalMinutes) Minutes" -Verbose
Stop-Transcript
Brandon Mitchell
11/19/2024, 12:20 PMBrandon Mitchell
11/19/2024, 12:23 PMif((Test-Path -LiteralPath "HKLM:\SYSTEM\CurrentControlSet\Services\UniService") -ne $true) { New-Item "HKLM:\SYSTEM\CurrentControlSet\Services\UniService" -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath 'HKLM:\SYSTEM\CurrentControlSet\Services\UniService' -Name 'BypassLayerCheck' -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;
} -Verbose
Nick Panaccio
11/19/2024, 12:57 PMNick Panaccio
11/19/2024, 12:58 PMBrandon Mitchell
11/19/2024, 1:15 PMgiphy
11/19/2024, 1:18 PMNick Panaccio
11/19/2024, 1:18 PMBrandon Mitchell
11/19/2024, 1:19 PMPaul Brown
11/19/2024, 3:54 PMDaniel Lazar
11/22/2024, 2:42 PMDaniel Lazar
11/22/2024, 2:43 PMPaul Brown
11/22/2024, 2:47 PMBrandon Mitchell
11/22/2024, 3:56 PMDaniel Lazar
11/22/2024, 5:02 PMBrandon Mitchell
11/22/2024, 6:25 PM