Remove scripts folder - moved to dedicated powershell-scripts repo
PowerShell scripts have been moved to a separate repository: ssh://git@localhost:2222/cproudlock/powershell-scripts.git This separates concerns and allows independent versioning of: - Asset collection scripts - Remote execution scripts - WinRM configuration utilities - Registry backup tools 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
240
scripts/3122.reg
240
scripts/3122.reg
@@ -1,240 +0,0 @@
|
||||
REGEDIT4
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC]
|
||||
"COMPUTERNAME"="G31N20R3ESF"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\Btr]
|
||||
"BTR Rate"="300"
|
||||
"Seq Search"="NO"
|
||||
"Auto Rewind"="YES"
|
||||
"BCC"="NO"
|
||||
"CMNT"="NO"
|
||||
"CmntLag"=dword:00000000
|
||||
"DisableScrnSvr"=""
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\DatC]
|
||||
"Debug"="NO"
|
||||
"Multi"="NO"
|
||||
"WorkStations"="0"
|
||||
"WS1"=""
|
||||
"WS2"=""
|
||||
"WS3"=""
|
||||
"WS4"=""
|
||||
"WS5"=""
|
||||
"WS6"=""
|
||||
"Files Threshold"="200"
|
||||
"Any"="NO"
|
||||
"DaysOld"="7"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\General]
|
||||
"Site"="WestJefferson"
|
||||
"Cnc"="Fanuc 30"
|
||||
"NcIF"="EFOCAS"
|
||||
"MachineNo"="3122"
|
||||
"Debug"="ON"
|
||||
"Uploads"="NO"
|
||||
"Scanner"="YES"
|
||||
"HostType"="WILM"
|
||||
"DvUpldDir"="..\\shared\\NC-DATA\\Okuma"
|
||||
"Ncedt"="NO"
|
||||
"Maint"="YES"
|
||||
"Mode"="Small"
|
||||
"Unit/Area"=""
|
||||
"Dripfeed"="NO"
|
||||
"ChangeWorkstation"="NO"
|
||||
"CWRegPath"="C:\\Program Files\\Dnc"
|
||||
"FtpFileSel"="Host"
|
||||
"DvDnldDir"=""
|
||||
"RemindEnable"="NO"
|
||||
"RemindBkupHost"=""
|
||||
"RemindBkupFolder"=""
|
||||
"Print"="NO"
|
||||
"FixTorque"="NO"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\Hssb]
|
||||
"KRelay1"=dword:0000000b
|
||||
"ProgIdLimit"="8000"
|
||||
"KeyCheck"="YES"
|
||||
"DelHighIds"="NO"
|
||||
"StdPmcG"="YES"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\MX]
|
||||
"FtpPasswd"="qxOG8q1QnR"
|
||||
"FtpHostPrimary"="tsgwp00525"
|
||||
"FtpHostSecondary"="tsgwp00525"
|
||||
"FtpAccount"="geaeevendale\\sfwj0ashp"
|
||||
"FtpHostType"="Windows"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\QUAL]
|
||||
"UserName"=""
|
||||
"Password"=""
|
||||
"Primary"=""
|
||||
"Secondary"=""
|
||||
"SocketNo"=""
|
||||
"Timeout"=""
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\Serial]
|
||||
"Port Id"="COM1"
|
||||
"Baud"="9600"
|
||||
"Parity"="None"
|
||||
"Data Bits"="8"
|
||||
"Stop Bits"="1"
|
||||
"CRLF"="NO"
|
||||
"EOL Delay"="NO"
|
||||
"MC2000Dels"="NO"
|
||||
"EOT"="NO"
|
||||
"EOL Delay msec"="0"
|
||||
"DeleteLT9000"=""
|
||||
"SwapSize"=""
|
||||
"2Saddle"="NO"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\Mark]
|
||||
"Port Id"="COM4"
|
||||
"Baud"="9600"
|
||||
"Parity"="None"
|
||||
"Data Bits"="8"
|
||||
"Stop Bits"="1"
|
||||
"Message Type"="V"
|
||||
"Debug"="ON"
|
||||
"MarkerType"="Mark2D"
|
||||
"DncPatterns"="YES"
|
||||
"CageCode"=""
|
||||
"DataHost"=""
|
||||
"DataPath"=""
|
||||
"MarkMasterPath"=""
|
||||
"Port Id2"=""
|
||||
"Baud2"=""
|
||||
"Parity2"=""
|
||||
"Data Bits2"=""
|
||||
"Stop Bits2"=""
|
||||
"DisableWeight"="NO"
|
||||
"DisableBarcode"="NO"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\NTSHR]
|
||||
"ShrHost"=""
|
||||
"ShrFolder"=""
|
||||
"ShrExt"=""
|
||||
"ShrFolder2"=""
|
||||
"ShrFolder3"=""
|
||||
"ProgIdLimit"=""
|
||||
"Deletes"=""
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\FtpDnld]
|
||||
"Target"=""
|
||||
"Username"=""
|
||||
"Password"=""
|
||||
"DirectoryPath"=""
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\DNC2]
|
||||
"MPRelay"=""
|
||||
"ProgIdLimit"=""
|
||||
"PMC-NB"="NO"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\FMS]
|
||||
"FMSHostPrimary"="WJFMS3"
|
||||
"FMSHostSecondary"="WJFMS3"
|
||||
"FMSSocketBase"="5003"
|
||||
"FMSTimeOut"=dword:00000000
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\PPDCS]
|
||||
"Port Id"="COM4"
|
||||
"Baud"="9600"
|
||||
"Data Bits"="8"
|
||||
"Parity"="None"
|
||||
"Stop Bits"="1"
|
||||
"Start Char"="DC2"
|
||||
"Wait Time"="250"
|
||||
"UserName"="DCP_SHOPWJ"
|
||||
"Password"="QSy1Go"
|
||||
"Primary"="wjfms3.ae.ge.com"
|
||||
"Secondary"="wjfms3.ae.ge.com"
|
||||
"Timeout"="10"
|
||||
"Files Threshold"="5"
|
||||
"FrontEnd"="PPMON"
|
||||
"TQM9030"="NO"
|
||||
"TextMode Menu"="NO"
|
||||
"TreeDisplay"="YES"
|
||||
"CLMShare"=""
|
||||
"ShareFile"=""
|
||||
"SharePoll"=""
|
||||
"MDMacroVar"=""
|
||||
"TQMCaron"="NO"
|
||||
"CycleStart Inhibits"="YES"
|
||||
"EnableSharePoll"="NO"
|
||||
"WaitForCncFile"=""
|
||||
"HostType"="VMS"
|
||||
"HostPath"=""
|
||||
"Port Id2"="COM1"
|
||||
"ShareHost"=""
|
||||
"SharePollUnits"="msec"
|
||||
"FileAge"=""
|
||||
"HostPath2"=""
|
||||
"SearchSubfolders"=""
|
||||
"ManualDataBadge"="NO"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\TncRemo]
|
||||
"TncFolder"=""
|
||||
"TncExt"=""
|
||||
"TncIpAddr"=""
|
||||
"Port"=""
|
||||
"Medium"=""
|
||||
"MjtLaser"=""
|
||||
"HFolder"=""
|
||||
"IFolder"=""
|
||||
"DFolder"=""
|
||||
"TABFolder"=""
|
||||
"TFolder"=""
|
||||
"TCHFolder"=""
|
||||
"PFolder"=""
|
||||
"PNTFolder"=""
|
||||
"CDTFolder"=""
|
||||
"AFolder"=""
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\eFocas]
|
||||
"IpAddr"="192.168.1.1"
|
||||
"SocketNo"="8192"
|
||||
"DualPath"="NO"
|
||||
"Path1Name"=""
|
||||
"Path2Name"=""
|
||||
"Danobat"="NO"
|
||||
"DataServer"="NO"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\TQM9030]
|
||||
"Port Id"=""
|
||||
"Baud"=""
|
||||
"Parity"=""
|
||||
"Data Bits"=""
|
||||
"Stop Bits"=""
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\HeatTreat]
|
||||
"FtpHost"=""
|
||||
"FtpAccount"=""
|
||||
"9030IpAddr"=""
|
||||
"9030Register"=""
|
||||
"CycleFilePath"=""
|
||||
"FtpPasswd"=""
|
||||
"9030Register2"=""
|
||||
"9030Register3"=""
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\Plant3]
|
||||
"Host"=""
|
||||
"Path"=""
|
||||
"Account"=""
|
||||
"Password"=""
|
||||
"EnableAutomation"="NO"
|
||||
"MachineType"="Lathe"
|
||||
"HostType"="Windows"
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\TQMCaron]
|
||||
"Port Id"=""
|
||||
"Baud"=""
|
||||
"Parity"=""
|
||||
"Data Bits"=""
|
||||
"Stop Bits"=""
|
||||
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\GE Aircraft Engines\DNC\PaintBooth]
|
||||
"DataHost"=""
|
||||
"DataFolder"=""
|
||||
"PlcIpAddress"=""
|
||||
"PollRate"=""
|
||||
|
||||
@@ -1,277 +0,0 @@
|
||||
# Backup-GERegistry.ps1
|
||||
# Backs up GE Aircraft Engines registry keys from both 32-bit and 64-bit locations
|
||||
# Saves to S:\DT\cameron\scan\backup\reg with naming: [machinenumber-]serialnumber-date.reg
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$BackupPath = "S:\DT\cameron\scan\backup\reg",
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[switch]$Silent = $false
|
||||
)
|
||||
|
||||
# Function to write colored output (only if not silent)
|
||||
function Write-ColorOutput {
|
||||
param(
|
||||
[string]$Message,
|
||||
[string]$Color = "White"
|
||||
)
|
||||
if (-not $Silent) {
|
||||
Write-Host $Message -ForegroundColor $Color
|
||||
}
|
||||
}
|
||||
|
||||
# Function to get machine number from registry
|
||||
function Get-MachineNumber {
|
||||
$machineNumber = $null
|
||||
|
||||
# Check GE Aircraft Engines registry paths for MachineNo
|
||||
$gePaths = @(
|
||||
"HKLM:\Software\GE Aircraft Engines\DNC\General",
|
||||
"HKLM:\Software\WOW6432Node\GE Aircraft Engines\DNC\General"
|
||||
)
|
||||
|
||||
foreach ($path in $gePaths) {
|
||||
if (Test-Path $path) {
|
||||
try {
|
||||
$regKey = Get-ItemProperty -Path $path -ErrorAction SilentlyContinue
|
||||
if ($regKey.MachineNo) {
|
||||
$machineNumber = $regKey.MachineNo
|
||||
Write-ColorOutput " Found MachineNo in registry: $machineNumber" "Green"
|
||||
break
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-ColorOutput " Could not read MachineNo from $path" "Yellow"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# If not found in registry, try hostname pattern matching
|
||||
if (-not $machineNumber) {
|
||||
$hostname = $env:COMPUTERNAME
|
||||
if ($hostname -match '(\d{4})') {
|
||||
$machineNumber = $matches[1]
|
||||
Write-ColorOutput " Extracted machine number from hostname: $machineNumber" "Cyan"
|
||||
}
|
||||
}
|
||||
|
||||
return $machineNumber
|
||||
}
|
||||
|
||||
# Function to get serial number
|
||||
function Get-SerialNumber {
|
||||
$serialNumber = $null
|
||||
|
||||
try {
|
||||
# Get serial number from WMI
|
||||
$bios = Get-WmiObject Win32_BIOS
|
||||
if ($bios.SerialNumber -and $bios.SerialNumber -ne "To be filled by O.E.M.") {
|
||||
$serialNumber = $bios.SerialNumber
|
||||
Write-ColorOutput " Found serial number: $serialNumber" "Green"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-ColorOutput " Could not retrieve serial number from BIOS" "Yellow"
|
||||
}
|
||||
|
||||
# If no serial number, use computer name as fallback
|
||||
if (-not $serialNumber) {
|
||||
$serialNumber = $env:COMPUTERNAME
|
||||
Write-ColorOutput " Using computer name as identifier: $serialNumber" "Cyan"
|
||||
}
|
||||
|
||||
return $serialNumber
|
||||
}
|
||||
|
||||
# Function to export registry key
|
||||
function Export-RegistryKey {
|
||||
param(
|
||||
[string]$RegistryPath,
|
||||
[string]$OutputFile,
|
||||
[string]$Description
|
||||
)
|
||||
|
||||
# Convert PowerShell path to reg.exe format
|
||||
$regPath = $RegistryPath -replace 'HKLM:', 'HKEY_LOCAL_MACHINE'
|
||||
|
||||
try {
|
||||
# Use reg export command
|
||||
$result = reg export "$regPath" "$OutputFile" /y 2>&1
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-ColorOutput " ✓ Exported $Description" "Green"
|
||||
return $true
|
||||
} else {
|
||||
Write-ColorOutput " ✗ Failed to export $Description" "Red"
|
||||
Write-ColorOutput " Error: $result" "Red"
|
||||
return $false
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-ColorOutput " ✗ Exception exporting $Description`: $_" "Red"
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
# Main script
|
||||
Write-ColorOutput "`n=== GE Aircraft Engines Registry Backup ===" "Cyan"
|
||||
Write-ColorOutput "Starting registry backup process..." "White"
|
||||
|
||||
# Get machine number and serial number
|
||||
Write-ColorOutput "`nGathering system information:" "Yellow"
|
||||
$machineNumber = Get-MachineNumber
|
||||
$serialNumber = Get-SerialNumber
|
||||
|
||||
# Create backup filename
|
||||
$dateStamp = Get-Date -Format "yyyyMMdd-HHmmss"
|
||||
if ($machineNumber) {
|
||||
$backupFileName = "${machineNumber}-${serialNumber}-${dateStamp}.reg"
|
||||
} else {
|
||||
$backupFileName = "${serialNumber}-${dateStamp}.reg"
|
||||
}
|
||||
|
||||
# Create backup directory if it doesn't exist
|
||||
if (-not (Test-Path $BackupPath)) {
|
||||
try {
|
||||
New-Item -ItemType Directory -Path $BackupPath -Force | Out-Null
|
||||
Write-ColorOutput "`nCreated backup directory: $BackupPath" "Green"
|
||||
}
|
||||
catch {
|
||||
Write-ColorOutput "`nFailed to create backup directory: $_" "Red"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Define registry paths to backup
|
||||
$registryPaths = @{
|
||||
'64bit' = @{
|
||||
Path = 'HKLM:\SOFTWARE\GE Aircraft Engines'
|
||||
Description = 'GE Aircraft Engines (64-bit)'
|
||||
OutputFile = Join-Path $BackupPath "64bit-$backupFileName"
|
||||
}
|
||||
'32bit' = @{
|
||||
Path = 'HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines'
|
||||
Description = 'GE Aircraft Engines (32-bit on 64-bit system)'
|
||||
OutputFile = Join-Path $BackupPath "32bit-$backupFileName"
|
||||
}
|
||||
}
|
||||
|
||||
# Backup registries
|
||||
Write-ColorOutput "`nBacking up GE Aircraft Engines registry keys:" "Yellow"
|
||||
$backupResults = @()
|
||||
|
||||
foreach ($type in $registryPaths.Keys) {
|
||||
$regInfo = $registryPaths[$type]
|
||||
|
||||
Write-ColorOutput "`n Checking $($regInfo.Description)..." "White"
|
||||
|
||||
if (Test-Path $regInfo.Path) {
|
||||
Write-ColorOutput " Found registry key at: $($regInfo.Path)" "Green"
|
||||
|
||||
$success = Export-RegistryKey -RegistryPath $regInfo.Path `
|
||||
-OutputFile $regInfo.OutputFile `
|
||||
-Description $regInfo.Description
|
||||
|
||||
if ($success -and (Test-Path $regInfo.OutputFile)) {
|
||||
$fileSize = (Get-Item $regInfo.OutputFile).Length
|
||||
$fileSizeKB = [math]::Round($fileSize / 1KB, 2)
|
||||
Write-ColorOutput (" Saved to: " + $regInfo.OutputFile + " (" + $fileSizeKB + " KB)") "Green"
|
||||
|
||||
$backupResults += @{
|
||||
Type = $type
|
||||
File = $regInfo.OutputFile
|
||||
Size = $fileSizeKB
|
||||
Success = $true
|
||||
}
|
||||
} else {
|
||||
$backupResults += @{
|
||||
Type = $type
|
||||
File = $regInfo.OutputFile
|
||||
Success = $false
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Write-ColorOutput " Registry key not found: $($regInfo.Path)" "Yellow"
|
||||
Write-ColorOutput " Skipping $type backup" "Yellow"
|
||||
}
|
||||
}
|
||||
|
||||
# Combined backup (both 32-bit and 64-bit in one file)
|
||||
Write-ColorOutput "`nCreating combined backup:" "Yellow"
|
||||
$combinedFile = Join-Path $BackupPath $backupFileName
|
||||
$combinedContent = @()
|
||||
|
||||
# Add header
|
||||
$combinedContent += "Windows Registry Editor Version 5.00"
|
||||
$combinedContent += ""
|
||||
$combinedContent += "; GE Aircraft Engines Registry Backup"
|
||||
$combinedContent += "; Machine: $machineNumber"
|
||||
$combinedContent += "; Serial: $serialNumber"
|
||||
$combinedContent += "; Date: $dateStamp"
|
||||
$combinedContent += "; Computer: $env:COMPUTERNAME"
|
||||
$combinedContent += ""
|
||||
|
||||
# Merge successful backups
|
||||
$mergedCount = 0
|
||||
foreach ($result in $backupResults | Where-Object { $_.Success }) {
|
||||
if (Test-Path $result.File) {
|
||||
Write-ColorOutput " Merging $($result.Type) backup..." "White"
|
||||
|
||||
# Read the file and skip the header
|
||||
$content = Get-Content $result.File
|
||||
if ($content.Count -gt 1) {
|
||||
# Skip the "Windows Registry Editor Version 5.00" line
|
||||
$contentToAdd = $content | Select-Object -Skip 1
|
||||
|
||||
$combinedContent += "; === $($result.Type) Registry ==="
|
||||
$combinedContent += $contentToAdd
|
||||
$combinedContent += ""
|
||||
$mergedCount++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($mergedCount -gt 0) {
|
||||
try {
|
||||
# Save combined file
|
||||
$combinedContent | Out-File -FilePath $combinedFile -Encoding Unicode
|
||||
|
||||
$fileSize = (Get-Item $combinedFile).Length
|
||||
$fileSizeKB = [math]::Round($fileSize / 1KB, 2)
|
||||
|
||||
Write-ColorOutput (" Combined backup saved: " + $combinedFile + " (" + $fileSizeKB + " KB)") "Green"
|
||||
|
||||
# Clean up individual files if combined was successful
|
||||
foreach ($result in $backupResults | Where-Object { $_.Success }) {
|
||||
if (Test-Path $result.File) {
|
||||
Remove-Item $result.File -Force
|
||||
Write-ColorOutput " Cleaned up temporary file: $($result.Type)" "Gray"
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-ColorOutput " ✗ Failed to create combined backup: $_" "Red"
|
||||
}
|
||||
} else {
|
||||
Write-ColorOutput " ✗ No registry keys were successfully backed up" "Red"
|
||||
}
|
||||
|
||||
# Summary
|
||||
Write-ColorOutput "`n=== Backup Summary ===" "Cyan"
|
||||
Write-ColorOutput "Machine Number: $(if ($machineNumber) { $machineNumber } else { 'Not found' })" "White"
|
||||
Write-ColorOutput "Serial Number: $serialNumber" "White"
|
||||
Write-ColorOutput "Backup Location: $BackupPath" "White"
|
||||
Write-ColorOutput "Backup File: $backupFileName" "White"
|
||||
|
||||
$successCount = ($backupResults | Where-Object { $_.Success }).Count
|
||||
$totalCount = $backupResults.Count
|
||||
|
||||
if ($successCount -gt 0) {
|
||||
Write-ColorOutput "`nBackup completed: $successCount of $totalCount registries backed up successfully" "Green"
|
||||
} else {
|
||||
Write-ColorOutput "`nNo GE Aircraft Engines registry keys found to backup" "Yellow"
|
||||
}
|
||||
|
||||
# Return success status
|
||||
exit $(if ($successCount -gt 0) { 0 } else { 1 })
|
||||
@@ -1,5 +0,0 @@
|
||||
Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*", "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" |
|
||||
Where-Object { $_.DisplayName } |
|
||||
Select-Object DisplayName, DisplayVersion, Publisher |
|
||||
Sort-Object DisplayName |
|
||||
Format-Table -AutoSize
|
||||
@@ -1,480 +0,0 @@
|
||||
# Functions to collect shopfloor PC network and communication configurations
|
||||
|
||||
# Function to get all network interfaces and their configurations
|
||||
function Get-NetworkInterfaceConfig {
|
||||
Write-Host " Collecting network interface information..." -ForegroundColor Yellow
|
||||
|
||||
$interfaces = @()
|
||||
|
||||
try {
|
||||
# Get all network adapters with IP configurations
|
||||
$adapters = Get-NetAdapter | Where-Object { $_.Status -eq 'Up' }
|
||||
|
||||
foreach ($adapter in $adapters) {
|
||||
$ipConfig = Get-NetIPConfiguration -InterfaceIndex $adapter.ifIndex -ErrorAction SilentlyContinue
|
||||
|
||||
if ($ipConfig -and $ipConfig.IPv4Address) {
|
||||
foreach ($ip in $ipConfig.IPv4Address) {
|
||||
$gateway = if ($ipConfig.IPv4DefaultGateway) { $ipConfig.IPv4DefaultGateway[0].NextHop } else { $null }
|
||||
|
||||
# Determine if this is a machine network (192.168.*.*)
|
||||
$isMachineNetwork = $ip.IPAddress -match '^192\.168\.'
|
||||
|
||||
$interface = @{
|
||||
InterfaceName = $adapter.Name
|
||||
IPAddress = $ip.IPAddress
|
||||
SubnetMask = $ip.PrefixLength # Will need conversion
|
||||
DefaultGateway = $gateway
|
||||
MACAddress = $adapter.MacAddress
|
||||
IsDHCP = if ($ipConfig.NetIPv4Interface.Dhcp -eq 'Enabled') { 1 } else { 0 }
|
||||
IsActive = 1
|
||||
IsMachineNetwork = if ($isMachineNetwork) { 1 } else { 0 }
|
||||
}
|
||||
|
||||
$interfaces += $interface
|
||||
|
||||
if ($isMachineNetwork) {
|
||||
Write-Host " Found machine network: $($ip.IPAddress) on $($adapter.Name)" -ForegroundColor Cyan
|
||||
}
|
||||
else {
|
||||
Write-Host " Found network: $($ip.IPAddress) on $($adapter.Name)" -ForegroundColor Gray
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host " Error collecting network info: $_" -ForegroundColor Red
|
||||
}
|
||||
|
||||
# Alternative method using WMI if NetAdapter cmdlets fail
|
||||
if ($interfaces.Count -eq 0) {
|
||||
try {
|
||||
$wmiAdapters = Get-WmiObject Win32_NetworkAdapterConfiguration | Where-Object { $_.IPEnabled -eq $true }
|
||||
|
||||
foreach ($adapter in $wmiAdapters) {
|
||||
if ($adapter.IPAddress) {
|
||||
foreach ($i in 0..($adapter.IPAddress.Count - 1)) {
|
||||
$ip = $adapter.IPAddress[$i]
|
||||
|
||||
# Skip IPv6 addresses
|
||||
if ($ip -match ':') { continue }
|
||||
|
||||
$isMachineNetwork = $ip -match '^192\.168\.'
|
||||
|
||||
$interface = @{
|
||||
InterfaceName = $adapter.Description
|
||||
IPAddress = $ip
|
||||
SubnetMask = $adapter.IPSubnet[$i]
|
||||
DefaultGateway = if ($adapter.DefaultIPGateway) { $adapter.DefaultIPGateway[0] } else { $null }
|
||||
MACAddress = $adapter.MACAddress
|
||||
IsDHCP = $adapter.DHCPEnabled
|
||||
IsActive = 1
|
||||
IsMachineNetwork = if ($isMachineNetwork) { 1 } else { 0 }
|
||||
}
|
||||
|
||||
$interfaces += $interface
|
||||
|
||||
if ($isMachineNetwork) {
|
||||
Write-Host " Found machine network: $ip on $($adapter.Description)" -ForegroundColor Cyan
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host " WMI method also failed: $_" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
return $interfaces
|
||||
}
|
||||
|
||||
# Function to get serial port configurations from registry
|
||||
function Get-SerialPortConfig {
|
||||
Write-Host " Collecting serial port configurations..." -ForegroundColor Yellow
|
||||
|
||||
$configs = @()
|
||||
|
||||
# Registry paths to check
|
||||
$registryPaths = @{
|
||||
'Serial' = @('HKLM:\SOFTWARE\GE Aircraft Engines\DNC\Serial', 'HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\Serial')
|
||||
'Mark' = @('HKLM:\SOFTWARE\GE Aircraft Engines\DNC\Mark', 'HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\Mark')
|
||||
'PPDCS' = @('HKLM:\SOFTWARE\GE Aircraft Engines\DNC\PPDCS', 'HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\PPDCS')
|
||||
'TQM9030' = @('HKLM:\SOFTWARE\GE Aircraft Engines\DNC\TQM9030', 'HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\TQM9030')
|
||||
'TQMCaron' = @('HKLM:\SOFTWARE\GE Aircraft Engines\DNC\TQMCaron', 'HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\TQMCaron')
|
||||
}
|
||||
|
||||
foreach ($configType in $registryPaths.Keys) {
|
||||
foreach ($path in $registryPaths[$configType]) {
|
||||
if (Test-Path $path) {
|
||||
try {
|
||||
$regValues = Get-ItemProperty -Path $path -ErrorAction SilentlyContinue
|
||||
|
||||
if ($regValues) {
|
||||
$config = @{
|
||||
ConfigType = $configType
|
||||
PortID = $regValues.'Port Id' -replace 'Port Id2', ''
|
||||
Baud = $regValues.Baud
|
||||
DataBits = $regValues.'Data Bits'
|
||||
StopBits = $regValues.'Stop Bits'
|
||||
Parity = $regValues.Parity
|
||||
CRLF = $regValues.CRLF
|
||||
IPAddress = $null
|
||||
SocketNo = $null
|
||||
AdditionalSettings = @{}
|
||||
}
|
||||
|
||||
# Collect any additional settings
|
||||
$standardKeys = @('Port Id', 'Baud', 'Data Bits', 'Stop Bits', 'Parity', 'CRLF', 'PSPath', 'PSParentPath', 'PSChildName', 'PSProvider')
|
||||
foreach ($prop in $regValues.PSObject.Properties) {
|
||||
if ($prop.Name -notin $standardKeys -and $prop.Value) {
|
||||
$config.AdditionalSettings[$prop.Name] = $prop.Value
|
||||
}
|
||||
}
|
||||
|
||||
# Convert additional settings to JSON
|
||||
if ($config.AdditionalSettings.Count -gt 0) {
|
||||
$config.AdditionalSettings = $config.AdditionalSettings | ConvertTo-Json -Compress
|
||||
}
|
||||
else {
|
||||
$config.AdditionalSettings = $null
|
||||
}
|
||||
|
||||
if ($config.PortID) {
|
||||
$configs += $config
|
||||
Write-Host " Found $configType config: Port $($config.PortID), Baud $($config.Baud)" -ForegroundColor Cyan
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host " Error reading $configType registry: $_" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Check for eFocas configuration (network-based)
|
||||
$efocasPaths = @('HKLM:\SOFTWARE\GE Aircraft Engines\DNC\eFocas', 'HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\eFocas')
|
||||
foreach ($path in $efocasPaths) {
|
||||
if (Test-Path $path) {
|
||||
try {
|
||||
$regValues = Get-ItemProperty -Path $path -ErrorAction SilentlyContinue
|
||||
|
||||
if ($regValues -and $regValues.IpAddr) {
|
||||
$config = @{
|
||||
ConfigType = 'eFocas'
|
||||
PortID = $null
|
||||
Baud = $null
|
||||
DataBits = $null
|
||||
StopBits = $null
|
||||
Parity = $null
|
||||
CRLF = $null
|
||||
IPAddress = $regValues.IpAddr
|
||||
SocketNo = $regValues.SocketNo
|
||||
AdditionalSettings = @{
|
||||
DualPath = $regValues.DualPath
|
||||
Path1Name = $regValues.Path1Name
|
||||
Path2Name = $regValues.Path2Name
|
||||
Danobat = $regValues.Danobat
|
||||
DataServer = $regValues.DataServer
|
||||
} | ConvertTo-Json -Compress
|
||||
}
|
||||
|
||||
$configs += $config
|
||||
Write-Host " Found eFocas config: IP $($config.IPAddress), Socket $($config.SocketNo)" -ForegroundColor Cyan
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host " Error reading eFocas registry: $_" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $configs
|
||||
}
|
||||
|
||||
# Function to get GE Aircraft Engines registry information and DualPath configuration
|
||||
function Get-GERegistryInfo {
|
||||
Write-Host " Collecting GE Aircraft Engines registry information..." -ForegroundColor Yellow
|
||||
|
||||
$geInfo = @{
|
||||
Registry32Bit = $false
|
||||
Registry64Bit = $false
|
||||
DualPathEnabled = $null
|
||||
Path1Name = $null
|
||||
Path2Name = $null
|
||||
RegistryNotes = @{}
|
||||
}
|
||||
|
||||
# Check both 32-bit and 64-bit registry paths
|
||||
$registryPaths = @{
|
||||
'32bit' = 'HKLM:\SOFTWARE\GE Aircraft Engines'
|
||||
'64bit' = 'HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines'
|
||||
}
|
||||
|
||||
foreach ($pathType in $registryPaths.Keys) {
|
||||
$basePath = $registryPaths[$pathType]
|
||||
Write-Host " Checking $pathType registry: $basePath" -ForegroundColor Gray
|
||||
|
||||
if (Test-Path $basePath) {
|
||||
Write-Host " [FOUND] GE Aircraft Engines in $pathType registry" -ForegroundColor Green
|
||||
|
||||
if ($pathType -eq '32bit') {
|
||||
$geInfo.Registry32Bit = $true
|
||||
} else {
|
||||
$geInfo.Registry64Bit = $true
|
||||
}
|
||||
|
||||
# Collect information about what's under GE Aircraft Engines
|
||||
try {
|
||||
$subKeys = Get-ChildItem -Path $basePath -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Name | ForEach-Object { Split-Path $_ -Leaf }
|
||||
$geInfo.RegistryNotes[$pathType] = @{
|
||||
BasePath = $basePath
|
||||
SubKeys = $subKeys -join ', '
|
||||
Found = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
|
||||
}
|
||||
Write-Host " Sub-keys found: $($subKeys -join ', ')" -ForegroundColor Cyan
|
||||
}
|
||||
catch {
|
||||
Write-Host " Error reading sub-keys: $_" -ForegroundColor Red
|
||||
$geInfo.RegistryNotes[$pathType] = @{
|
||||
Error = $_.Exception.Message
|
||||
}
|
||||
}
|
||||
|
||||
# Check for DualPath configuration in eFocas
|
||||
$efocasPath = "$basePath\DNC\eFocas"
|
||||
if (Test-Path $efocasPath) {
|
||||
Write-Host " Checking eFocas configuration for DualPath..." -ForegroundColor Yellow
|
||||
try {
|
||||
$efocasValues = Get-ItemProperty -Path $efocasPath -ErrorAction SilentlyContinue
|
||||
|
||||
if ($efocasValues.DualPath) {
|
||||
Write-Host " [FOUND] DualPath = $($efocasValues.DualPath)" -ForegroundColor Green
|
||||
|
||||
# Handle case where both registry locations exist - prioritize settings from first found
|
||||
if ($geInfo.DualPathEnabled -eq $null) {
|
||||
$geInfo.DualPathEnabled = $efocasValues.DualPath -eq 'YES'
|
||||
Write-Host " Setting DualPath from $pathType registry: $($geInfo.DualPathEnabled)" -ForegroundColor Cyan
|
||||
} else {
|
||||
Write-Host " DualPath already set from other registry location, keeping existing value" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Handle Path1Name - use first non-empty value found
|
||||
if (!$geInfo.Path1Name -and $efocasValues.Path1Name) {
|
||||
$geInfo.Path1Name = $efocasValues.Path1Name
|
||||
Write-Host " Path1Name = $($efocasValues.Path1Name)" -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
# Handle Path2Name - use first non-empty value found
|
||||
if (!$geInfo.Path2Name -and $efocasValues.Path2Name) {
|
||||
$geInfo.Path2Name = $efocasValues.Path2Name
|
||||
Write-Host " Path2Name = $($efocasValues.Path2Name)" -ForegroundColor Cyan
|
||||
}
|
||||
|
||||
# Store additional eFocas settings
|
||||
$geInfo.RegistryNotes["$pathType-eFocas"] = @{
|
||||
DualPath = $efocasValues.DualPath
|
||||
Path1Name = $efocasValues.Path1Name
|
||||
Path2Name = $efocasValues.Path2Name
|
||||
IpAddr = $efocasValues.IpAddr
|
||||
SocketNo = $efocasValues.SocketNo
|
||||
Danobat = $efocasValues.Danobat
|
||||
DataServer = $efocasValues.DataServer
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host " Error reading eFocas configuration: $_" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Write-Host " [NOT FOUND] No GE Aircraft Engines in $pathType registry" -ForegroundColor Gray
|
||||
}
|
||||
}
|
||||
|
||||
# Summary
|
||||
Write-Host " GE Registry Summary:" -ForegroundColor Green
|
||||
Write-Host " 32-bit registry: $(if ($geInfo.Registry32Bit) { 'YES' } else { 'NO' })" -ForegroundColor Cyan
|
||||
Write-Host " 64-bit registry: $(if ($geInfo.Registry64Bit) { 'YES' } else { 'NO' })" -ForegroundColor Cyan
|
||||
Write-Host " DualPath enabled: $(if ($geInfo.DualPathEnabled -eq $null) { 'NOT FOUND' } elseif ($geInfo.DualPathEnabled) { 'YES' } else { 'NO' })" -ForegroundColor Cyan
|
||||
if ($geInfo.Path1Name) { Write-Host " Path1Name: $($geInfo.Path1Name)" -ForegroundColor Cyan }
|
||||
if ($geInfo.Path2Name) { Write-Host " Path2Name: $($geInfo.Path2Name)" -ForegroundColor Cyan }
|
||||
|
||||
return $geInfo
|
||||
}
|
||||
|
||||
# Function to get DNC configuration from registry
|
||||
function Get-DNCConfig {
|
||||
Write-Host " Collecting DNC configuration..." -ForegroundColor Yellow
|
||||
|
||||
$dncConfig = $null
|
||||
$paths = @('HKLM:\SOFTWARE\GE Aircraft Engines\DNC\General', 'HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\General')
|
||||
|
||||
Write-Host " Checking registry paths for DNC config..." -ForegroundColor Gray
|
||||
foreach ($path in $paths) {
|
||||
Write-Host " Checking path: $path" -ForegroundColor Gray
|
||||
if (Test-Path $path) {
|
||||
Write-Host " Path exists! Reading values..." -ForegroundColor Green
|
||||
try {
|
||||
$general = Get-ItemProperty -Path $path -ErrorAction SilentlyContinue
|
||||
$mxPath = $path -replace 'General', 'MX'
|
||||
$mx = Get-ItemProperty -Path $mxPath -ErrorAction SilentlyContinue
|
||||
$fmsPath = $path -replace 'General', 'FMS'
|
||||
$fms = Get-ItemProperty -Path $fmsPath -ErrorAction SilentlyContinue
|
||||
|
||||
if ($general) {
|
||||
Write-Host " Found General config values!" -ForegroundColor Green
|
||||
$dncConfig = @{
|
||||
Site = $general.Site
|
||||
CNC = $general.Cnc
|
||||
NcIF = $general.NcIF
|
||||
MachineNo = $general.MachineNo
|
||||
HostType = $general.HostType
|
||||
FtpHostPrimary = if ($mx) { $mx.FtpHostPrimary } else { $null }
|
||||
FtpHostSecondary = if ($mx) { $mx.FtpHostSecondary } else { $null }
|
||||
FtpAccount = if ($mx) { $mx.FtpAccount } else { $null }
|
||||
Debug = $general.Debug
|
||||
Uploads = $general.Uploads
|
||||
Scanner = $general.Scanner
|
||||
Dripfeed = $general.Dripfeed
|
||||
AdditionalSettings = @{
|
||||
Mode = $general.Mode
|
||||
'Unit/Area' = $general.'Unit/Area'
|
||||
DvUpldDir = $general.DvUpldDir
|
||||
Ncedt = $general.Ncedt
|
||||
Maint = $general.Maint
|
||||
ChangeWorkstation = $general.ChangeWorkstation
|
||||
FMSHostPrimary = if ($fms) { $fms.FMSHostPrimary } else { $null }
|
||||
FMSHostSecondary = if ($fms) { $fms.FMSHostSecondary } else { $null }
|
||||
} | ConvertTo-Json -Compress
|
||||
}
|
||||
|
||||
Write-Host " Found DNC config: Site=$($dncConfig.Site), MachineNo=$($dncConfig.MachineNo), CNC=$($dncConfig.CNC)" -ForegroundColor Cyan
|
||||
Write-Host " DNC Config JSON: $($dncConfig | ConvertTo-Json -Compress)" -ForegroundColor Gray
|
||||
break
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host " Error reading DNC registry: $_" -ForegroundColor Red
|
||||
}
|
||||
} else {
|
||||
Write-Host " Path does not exist" -ForegroundColor Yellow
|
||||
}
|
||||
}
|
||||
|
||||
if (-not $dncConfig) {
|
||||
Write-Host " No DNC configuration found in registry" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
return $dncConfig
|
||||
}
|
||||
|
||||
# Main function to collect all shopfloor configurations
|
||||
function Get-ShopfloorConfigurations {
|
||||
Write-Host "`nCollecting shopfloor-specific configurations..." -ForegroundColor Yellow
|
||||
|
||||
$configurations = @{
|
||||
NetworkInterfaces = Get-NetworkInterfaceConfig
|
||||
CommConfigs = Get-SerialPortConfig
|
||||
DNCConfig = Get-DNCConfig
|
||||
GERegistryInfo = Get-GERegistryInfo
|
||||
}
|
||||
|
||||
# Summary
|
||||
Write-Host "`n Configuration Summary:" -ForegroundColor Green
|
||||
Write-Host " Network Interfaces: $($configurations.NetworkInterfaces.Count)" -ForegroundColor Cyan
|
||||
Write-Host " Comm Configs: $($configurations.CommConfigs.Count)" -ForegroundColor Cyan
|
||||
Write-Host " DNC Config: $(if ($configurations.DNCConfig) { 'Yes' } else { 'No' })" -ForegroundColor Cyan
|
||||
Write-Host " GE Registry (32-bit): $(if ($configurations.GERegistryInfo.Registry32Bit) { 'Yes' } else { 'No' })" -ForegroundColor Cyan
|
||||
Write-Host " GE Registry (64-bit): $(if ($configurations.GERegistryInfo.Registry64Bit) { 'Yes' } else { 'No' })" -ForegroundColor Cyan
|
||||
Write-Host " DualPath Enabled: $(if ($configurations.GERegistryInfo.DualPathEnabled -eq $null) { 'Not Found' } elseif ($configurations.GERegistryInfo.DualPathEnabled) { 'Yes' } else { 'No' })" -ForegroundColor Cyan
|
||||
|
||||
return $configurations
|
||||
}
|
||||
|
||||
function Get-InstalledApplications {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Detects UDC and CLM applications and their active status on shopfloor PCs
|
||||
.DESCRIPTION
|
||||
Checks for UDC (UDC.exe) and CLM (ppdcs.exe) processes and returns data
|
||||
compatible with your existing installedapps table structure.
|
||||
#>
|
||||
|
||||
Write-Host " Scanning for UDC and CLM applications..." -ForegroundColor Yellow
|
||||
|
||||
$detectedApps = @()
|
||||
|
||||
try {
|
||||
# Define the two applications we're looking for
|
||||
$appsToCheck = @{
|
||||
'UDC' = @{
|
||||
AppID = 2 # Universal Data Collector
|
||||
ProcessName = 'UDC' # UDC.exe shows as 'UDC' in Get-Process
|
||||
Description = 'Universal Data Collector'
|
||||
}
|
||||
'CLM' = @{
|
||||
AppID = 4 # Legacy UDC (CLM)
|
||||
ProcessName = 'ppdcs' # ppdcs.exe shows as 'ppdcs' in Get-Process
|
||||
Description = 'Legacy UDC (Cell Level Manager)'
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($appName in $appsToCheck.Keys) {
|
||||
$app = $appsToCheck[$appName]
|
||||
|
||||
Write-Host " Checking for $appName (AppID: $($app.AppID))..." -ForegroundColor Gray
|
||||
|
||||
# Check if the process is running
|
||||
$isActive = $false
|
||||
$processInfo = $null
|
||||
|
||||
try {
|
||||
$processes = Get-Process -Name $app.ProcessName -ErrorAction SilentlyContinue
|
||||
if ($processes) {
|
||||
$isActive = $true
|
||||
$processInfo = $processes[0] # Take first instance if multiple
|
||||
Write-Host " [ACTIVE] Found running process: $($app.ProcessName).exe (PID: $($processInfo.Id))" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host " [NOT ACTIVE] Process $($app.ProcessName).exe not running" -ForegroundColor Gray
|
||||
}
|
||||
} catch {
|
||||
Write-Host " [ERROR] Failed to check process $($app.ProcessName): $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Always return app info (both active and inactive)
|
||||
$detectedApps += @{
|
||||
AppID = $app.AppID
|
||||
AppName = $appName
|
||||
Description = $app.Description
|
||||
ProcessName = $app.ProcessName
|
||||
IsActive = $isActive
|
||||
ProcessID = if ($processInfo) { $processInfo.Id } else { $null }
|
||||
ProcessStartTime = if ($processInfo) { $processInfo.StartTime } else { $null }
|
||||
}
|
||||
}
|
||||
|
||||
# Business rule validation: Only one should be active
|
||||
$activeApps = $detectedApps | Where-Object { $_.IsActive -eq $true }
|
||||
|
||||
if ($activeApps.Count -gt 1) {
|
||||
Write-Host " [WARNING] Multiple applications active simultaneously:" -ForegroundColor Red
|
||||
foreach ($activeApp in $activeApps) {
|
||||
Write-Host " - $($activeApp.AppName) (PID: $($activeApp.ProcessID))" -ForegroundColor Red
|
||||
}
|
||||
} elseif ($activeApps.Count -eq 1) {
|
||||
$activeApp = $activeApps[0]
|
||||
Write-Host " [OK] Single active application: $($activeApp.AppName) (PID: $($activeApp.ProcessID))" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host " [INFO] No UDC or CLM applications currently running" -ForegroundColor Gray
|
||||
}
|
||||
|
||||
return $detectedApps
|
||||
|
||||
} catch {
|
||||
Write-Host " [ERROR] Failed to scan for applications: $($_.Exception.Message)" -ForegroundColor Red
|
||||
return @()
|
||||
}
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
# Install-AssetCollectionSchedule.ps1
|
||||
# Creates a Windows scheduled task to run asset collection 4 times daily in the background
|
||||
|
||||
param(
|
||||
[string]$ScriptPath = "S:\DT\adata\script\Update-PC-CompleteAsset-Silent.bat",
|
||||
[string]$TaskName = "GE Asset Collection",
|
||||
[string]$TaskDescription = "Automated PC asset collection for GE shopfloor systems - runs silently 4 times daily"
|
||||
)
|
||||
|
||||
Write-Host "===================================== " -ForegroundColor Cyan
|
||||
Write-Host "GE Asset Collection - Schedule Installer" -ForegroundColor Cyan
|
||||
Write-Host "===================================== " -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Check if running as administrator
|
||||
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
|
||||
Write-Host "[ERROR] This script must be run as Administrator to create scheduled tasks" -ForegroundColor Red
|
||||
Write-Host "Please right-click and 'Run as Administrator'" -ForegroundColor Yellow
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Verify the script file exists
|
||||
if (-not (Test-Path $ScriptPath)) {
|
||||
Write-Host "[ERROR] Asset collection script not found at: $ScriptPath" -ForegroundColor Red
|
||||
Write-Host "Please ensure the script is deployed to the correct location" -ForegroundColor Yellow
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Installing scheduled task for automated asset collection..." -ForegroundColor Green
|
||||
Write-Host " Script Path: $ScriptPath" -ForegroundColor Gray
|
||||
Write-Host " Task Name: $TaskName" -ForegroundColor Gray
|
||||
Write-Host " Frequency: 4 times daily (every 6 hours)" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
try {
|
||||
# Remove existing task if it exists
|
||||
$existingTask = Get-ScheduledTask -TaskName $TaskName -ErrorAction SilentlyContinue
|
||||
if ($existingTask) {
|
||||
Write-Host "Removing existing scheduled task..." -ForegroundColor Yellow
|
||||
Unregister-ScheduledTask -TaskName $TaskName -Confirm:$false
|
||||
}
|
||||
|
||||
# Define the action - run the batch file completely hidden
|
||||
$action = New-ScheduledTaskAction -Execute "cmd.exe" -Argument "/c `"$ScriptPath`"" -WorkingDirectory "S:\DT\adata\script"
|
||||
|
||||
# Define multiple triggers for 4 times daily (6:00 AM, 12:00 PM, 6:00 PM, 12:00 AM)
|
||||
$trigger1 = New-ScheduledTaskTrigger -Daily -At "06:00"
|
||||
$trigger2 = New-ScheduledTaskTrigger -Daily -At "12:00"
|
||||
$trigger3 = New-ScheduledTaskTrigger -Daily -At "18:00"
|
||||
$trigger4 = New-ScheduledTaskTrigger -Daily -At "00:00"
|
||||
|
||||
# Define settings - run in background, don't disturb users
|
||||
$settings = New-ScheduledTaskSettingsSet `
|
||||
-AllowStartIfOnBatteries `
|
||||
-DontStopIfGoingOnBatteries `
|
||||
-StartWhenAvailable `
|
||||
-RunOnlyIfNetworkAvailable `
|
||||
-DontStopOnIdleEnd `
|
||||
-Hidden `
|
||||
-Priority 4 `
|
||||
-ExecutionTimeLimit (New-TimeSpan -Hours 2) `
|
||||
-RestartCount 3 `
|
||||
-RestartInterval (New-TimeSpan -Minutes 10)
|
||||
|
||||
# Run as SYSTEM account for maximum permissions and no user interaction
|
||||
$principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest
|
||||
|
||||
# Create the scheduled task
|
||||
$task = New-ScheduledTask -Action $action -Trigger @($trigger1, $trigger2, $trigger3, $trigger4) -Settings $settings -Principal $principal -Description $TaskDescription
|
||||
|
||||
# Register the task
|
||||
Register-ScheduledTask -TaskName $TaskName -InputObject $task -Force
|
||||
|
||||
Write-Host "[SUCCESS] Scheduled task created successfully!" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "Task Details:" -ForegroundColor Cyan
|
||||
Write-Host " Name: $TaskName" -ForegroundColor Gray
|
||||
Write-Host " Schedule: 4 times daily at 6:00 AM, 12:00 PM, 6:00 PM, 12:00 AM" -ForegroundColor Gray
|
||||
Write-Host " Account: SYSTEM (runs in background)" -ForegroundColor Gray
|
||||
Write-Host " Hidden: Yes (no user interruption)" -ForegroundColor Gray
|
||||
Write-Host " Network Required: Yes" -ForegroundColor Gray
|
||||
Write-Host " Max Runtime: 2 hours" -ForegroundColor Gray
|
||||
Write-Host " Auto Restart: 3 attempts if failed" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
# Test the task by running it once
|
||||
Write-Host "Testing scheduled task..." -ForegroundColor Yellow
|
||||
Start-ScheduledTask -TaskName $TaskName
|
||||
|
||||
Start-Sleep -Seconds 3
|
||||
|
||||
$taskInfo = Get-ScheduledTaskInfo -TaskName $TaskName
|
||||
Write-Host " Last Run: $($taskInfo.LastRunTime)" -ForegroundColor Gray
|
||||
Write-Host " Last Result: $($taskInfo.LastTaskResult)" -ForegroundColor Gray
|
||||
Write-Host " Next Run: $($taskInfo.NextRunTime)" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "[INFO] Task installation complete!" -ForegroundColor Green
|
||||
Write-Host "The asset collection will now run automatically 4 times daily in the background." -ForegroundColor Green
|
||||
Write-Host "Users will not see any windows or be interrupted during execution." -ForegroundColor Green
|
||||
|
||||
} catch {
|
||||
Write-Host "[ERROR] Failed to create scheduled task: $($_.Exception.Message)" -ForegroundColor Red
|
||||
Write-Host "Please check Windows Event Viewer for additional details" -ForegroundColor Yellow
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "===================================== " -ForegroundColor Cyan
|
||||
Write-Host "Installation Complete" -ForegroundColor Cyan
|
||||
Write-Host "===================================== " -ForegroundColor Cyan
|
||||
@@ -1,559 +0,0 @@
|
||||
#Requires -RunAsAdministrator
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Remotely executes asset collection script on shopfloor PCs using WinRM over HTTPS.
|
||||
|
||||
.DESCRIPTION
|
||||
This script uses WinRM HTTPS to securely execute the Update-PC-CompleteAsset.ps1 script
|
||||
on multiple shopfloor PCs. It handles:
|
||||
1. Secure HTTPS connections using wildcard certificates
|
||||
2. Automatic FQDN resolution from hostnames
|
||||
3. Credential management for remote connections
|
||||
4. Parallel execution across multiple PCs
|
||||
5. Error handling and logging for remote operations
|
||||
6. Collection of results from each remote PC
|
||||
|
||||
.PARAMETER HostnameList
|
||||
Array of computer hostnames (without domain suffix).
|
||||
|
||||
.PARAMETER HostnameListFile
|
||||
Path to a text file containing hostnames (one per line, without domain suffix).
|
||||
|
||||
.PARAMETER Domain
|
||||
Domain suffix for FQDNs (e.g., "logon.ds.ge.com").
|
||||
Will construct FQDNs as: hostname.domain
|
||||
|
||||
.PARAMETER Credential
|
||||
PSCredential object for authenticating to remote computers.
|
||||
If not provided, will prompt for credentials.
|
||||
|
||||
.PARAMETER MaxConcurrent
|
||||
Maximum number of concurrent remote sessions (default: 5).
|
||||
|
||||
.PARAMETER Port
|
||||
HTTPS port for WinRM (default: 5986).
|
||||
|
||||
.PARAMETER ProxyURL
|
||||
URL for the warranty proxy server (passed to remote script).
|
||||
|
||||
.PARAMETER DashboardURL
|
||||
URL for the dashboard API (passed to remote script).
|
||||
|
||||
.PARAMETER SkipWarranty
|
||||
Skip warranty lookups on remote PCs (passed to remote script).
|
||||
|
||||
.PARAMETER LogPath
|
||||
Path for log files (default: .\logs\remote-collection-https.log).
|
||||
|
||||
.PARAMETER TestConnections
|
||||
Test remote HTTPS connections without running the full collection.
|
||||
|
||||
.PARAMETER ScriptPath
|
||||
Path to the Update-PC-CompleteAsset.ps1 script on remote computers.
|
||||
Default: C:\Scripts\Update-PC-CompleteAsset.ps1
|
||||
|
||||
.PARAMETER SkipCertificateCheck
|
||||
Skip SSL certificate validation (not recommended for production).
|
||||
|
||||
.EXAMPLE
|
||||
# Collect from specific hostnames
|
||||
.\Invoke-RemoteAssetCollection-HTTPS.ps1 -HostnameList @("PC001", "PC002") -Domain "logon.ds.ge.com"
|
||||
|
||||
.EXAMPLE
|
||||
# Collect from hostnames in file
|
||||
.\Invoke-RemoteAssetCollection-HTTPS.ps1 -HostnameListFile ".\shopfloor-hostnames.txt" -Domain "logon.ds.ge.com"
|
||||
|
||||
.EXAMPLE
|
||||
# Test HTTPS connections only
|
||||
.\Invoke-RemoteAssetCollection-HTTPS.ps1 -HostnameList @("PC001") -Domain "logon.ds.ge.com" -TestConnections
|
||||
|
||||
.EXAMPLE
|
||||
# Use stored credentials
|
||||
$cred = Get-Credential
|
||||
.\Invoke-RemoteAssetCollection-HTTPS.ps1 -HostnameListFile ".\shopfloor-hostnames.txt" `
|
||||
-Domain "logon.ds.ge.com" -Credential $cred
|
||||
|
||||
.NOTES
|
||||
Author: System Administrator
|
||||
Date: 2025-10-17
|
||||
Version: 1.0
|
||||
|
||||
Prerequisites:
|
||||
1. WinRM HTTPS must be configured on target computers (use Setup-WinRM-HTTPS.ps1)
|
||||
2. Wildcard certificate installed on target computers
|
||||
3. PowerShell 5.1 or later
|
||||
4. Update-PC-CompleteAsset.ps1 must be present on target computers
|
||||
5. Credentials with admin rights on target computers
|
||||
6. Network connectivity to target computers on port 5986
|
||||
|
||||
Advantages over HTTP WinRM:
|
||||
- Encrypted traffic (credentials and data)
|
||||
- No TrustedHosts configuration required
|
||||
- Better security posture for production environments
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string[]]$HostnameList = @(),
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$HostnameListFile,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$Domain,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[PSCredential]$Credential,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[int]$MaxConcurrent = 5,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[int]$Port = 5986,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$ProxyURL = "http://10.48.130.158/vendor-api-proxy.php",
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$DashboardURL = "https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp",
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[switch]$SkipWarranty = $true,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$LogPath = ".\logs\remote-collection-https.log",
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[switch]$TestConnections = $false,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$ScriptPath = "C:\Scripts\Update-PC-CompleteAsset.ps1",
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[switch]$SkipCertificateCheck = $false
|
||||
)
|
||||
|
||||
# =============================================================================
|
||||
# SSL/TLS Certificate Bypass for HTTPS connections
|
||||
# =============================================================================
|
||||
try {
|
||||
if (-not ([System.Management.Automation.PSTypeName]'TrustAllCertsPolicy').Type) {
|
||||
Add-Type @"
|
||||
using System.Net;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
public class TrustAllCertsPolicy : ICertificatePolicy {
|
||||
public bool CheckValidationResult(
|
||||
ServicePoint srvPoint, X509Certificate certificate,
|
||||
WebRequest request, int certificateProblem) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
"@
|
||||
}
|
||||
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
|
||||
} catch { }
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
# Initialize logging
|
||||
function Initialize-Logging {
|
||||
param([string]$LogPath)
|
||||
|
||||
$logDir = Split-Path $LogPath -Parent
|
||||
if (-not (Test-Path $logDir)) {
|
||||
New-Item -ItemType Directory -Path $logDir -Force | Out-Null
|
||||
}
|
||||
|
||||
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
|
||||
Add-Content -Path $LogPath -Value "[$timestamp] Remote asset collection (HTTPS) started"
|
||||
}
|
||||
|
||||
function Write-Log {
|
||||
param([string]$Message, [string]$LogPath, [string]$Level = "INFO")
|
||||
|
||||
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
|
||||
$logEntry = "[$timestamp] [$Level] $Message"
|
||||
|
||||
Add-Content -Path $LogPath -Value $logEntry
|
||||
|
||||
switch ($Level) {
|
||||
"ERROR" { Write-Host $logEntry -ForegroundColor Red }
|
||||
"WARN" { Write-Host $logEntry -ForegroundColor Yellow }
|
||||
"SUCCESS" { Write-Host $logEntry -ForegroundColor Green }
|
||||
default { Write-Host $logEntry -ForegroundColor White }
|
||||
}
|
||||
}
|
||||
|
||||
function Get-ComputerTargets {
|
||||
param([string[]]$HostnameList, [string]$HostnameListFile, [string]$Domain)
|
||||
|
||||
$hostnames = @()
|
||||
|
||||
# Add hostnames from direct list
|
||||
if ($HostnameList.Count -gt 0) {
|
||||
$hostnames += $HostnameList
|
||||
}
|
||||
|
||||
# Add hostnames from file
|
||||
if (-not [string]::IsNullOrEmpty($HostnameListFile)) {
|
||||
if (Test-Path $HostnameListFile) {
|
||||
$fileHostnames = Get-Content $HostnameListFile |
|
||||
Where-Object { $_.Trim() -ne "" -and -not $_.StartsWith("#") } |
|
||||
ForEach-Object { $_.Trim() }
|
||||
$hostnames += $fileHostnames
|
||||
} else {
|
||||
Write-Log "Hostname list file not found: $HostnameListFile" $LogPath "ERROR"
|
||||
}
|
||||
}
|
||||
|
||||
# Remove duplicates and construct FQDNs
|
||||
$fqdns = $hostnames |
|
||||
Sort-Object -Unique |
|
||||
ForEach-Object {
|
||||
$hostname = $_.Trim()
|
||||
# Remove domain if already present
|
||||
if ($hostname -like "*.$Domain") {
|
||||
$hostname
|
||||
} else {
|
||||
"$hostname.$Domain"
|
||||
}
|
||||
}
|
||||
|
||||
return $fqdns
|
||||
}
|
||||
|
||||
function Resolve-ComputerIP {
|
||||
param([string]$FQDN)
|
||||
|
||||
try {
|
||||
$result = Resolve-DnsName -Name $FQDN -Type A -ErrorAction Stop
|
||||
if ($result -and $result[0].IPAddress) {
|
||||
return $result[0].IPAddress
|
||||
}
|
||||
return $null
|
||||
}
|
||||
catch {
|
||||
return $null
|
||||
}
|
||||
}
|
||||
|
||||
function Test-WinRMHTTPSConnection {
|
||||
param([string]$ComputerName, [PSCredential]$Credential, [int]$Port, [bool]$SkipCertCheck)
|
||||
|
||||
try {
|
||||
$sessionOptions = New-PSSessionOption -SkipCACheck:$SkipCertCheck -SkipCNCheck:$SkipCertCheck
|
||||
|
||||
$session = New-PSSession -ComputerName $ComputerName `
|
||||
-Credential $Credential `
|
||||
-UseSSL `
|
||||
-Port $Port `
|
||||
-SessionOption $sessionOptions `
|
||||
-ErrorAction Stop
|
||||
|
||||
Remove-PSSession $session
|
||||
return $true
|
||||
}
|
||||
catch {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
function Test-RemoteScriptExists {
|
||||
param([string]$ComputerName, [PSCredential]$Credential, [string]$ScriptPath, [int]$Port, [bool]$SkipCertCheck)
|
||||
|
||||
try {
|
||||
$sessionOptions = New-PSSessionOption -SkipCACheck:$SkipCertCheck -SkipCNCheck:$SkipCertCheck
|
||||
|
||||
$result = Invoke-Command -ComputerName $ComputerName `
|
||||
-Credential $Credential `
|
||||
-UseSSL `
|
||||
-Port $Port `
|
||||
-SessionOption $sessionOptions `
|
||||
-ScriptBlock {
|
||||
param($Path)
|
||||
Test-Path $Path
|
||||
} -ArgumentList $ScriptPath
|
||||
|
||||
return $result
|
||||
}
|
||||
catch {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-RemoteAssetScript {
|
||||
param(
|
||||
[string]$ComputerName,
|
||||
[PSCredential]$Credential,
|
||||
[string]$ScriptPath,
|
||||
[string]$ProxyURL,
|
||||
[string]$DashboardURL,
|
||||
[bool]$SkipWarranty,
|
||||
[int]$Port,
|
||||
[bool]$SkipCertCheck,
|
||||
[string]$LogPath
|
||||
)
|
||||
|
||||
try {
|
||||
Write-Log "Starting asset collection on $ComputerName (HTTPS)" $LogPath "INFO"
|
||||
|
||||
$sessionOptions = New-PSSessionOption -SkipCACheck:$SkipCertCheck -SkipCNCheck:$SkipCertCheck
|
||||
|
||||
# Execute the script remotely
|
||||
$result = Invoke-Command -ComputerName $ComputerName `
|
||||
-Credential $Credential `
|
||||
-UseSSL `
|
||||
-Port $Port `
|
||||
-SessionOption $sessionOptions `
|
||||
-ScriptBlock {
|
||||
param($ScriptPath, $ProxyURL, $DashboardURL, $SkipWarranty)
|
||||
|
||||
# Change to script directory
|
||||
$scriptDir = Split-Path $ScriptPath -Parent
|
||||
Set-Location $scriptDir
|
||||
|
||||
# Build parameters
|
||||
$params = @{
|
||||
ProxyURL = $ProxyURL
|
||||
DashboardURL = $DashboardURL
|
||||
}
|
||||
|
||||
if ($SkipWarranty) {
|
||||
$params.SkipWarranty = $true
|
||||
}
|
||||
|
||||
# Execute the script and capture output
|
||||
try {
|
||||
& $ScriptPath @params
|
||||
return @{
|
||||
Success = $true
|
||||
Output = "Script completed successfully"
|
||||
Error = $null
|
||||
}
|
||||
}
|
||||
catch {
|
||||
return @{
|
||||
Success = $false
|
||||
Output = $null
|
||||
Error = $_.Exception.Message
|
||||
}
|
||||
}
|
||||
} -ArgumentList $ScriptPath, $ProxyURL, $DashboardURL, $SkipWarranty
|
||||
|
||||
if ($result.Success) {
|
||||
Write-Log "Asset collection completed successfully on $ComputerName" $LogPath "SUCCESS"
|
||||
return @{ Success = $true; Computer = $ComputerName; Message = $result.Output }
|
||||
} else {
|
||||
Write-Log "Asset collection failed on $ComputerName: $($result.Error)" $LogPath "ERROR"
|
||||
return @{ Success = $false; Computer = $ComputerName; Message = $result.Error }
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$errorMsg = "Failed to execute on $ComputerName: $($_.Exception.Message)"
|
||||
Write-Log $errorMsg $LogPath "ERROR"
|
||||
return @{ Success = $false; Computer = $ComputerName; Message = $errorMsg }
|
||||
}
|
||||
}
|
||||
|
||||
function Show-SetupInstructions {
|
||||
param([string]$Domain)
|
||||
|
||||
Write-Host "`n=== WinRM HTTPS Setup Instructions ===" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "On each target computer, run the Setup-WinRM-HTTPS.ps1 script:" -ForegroundColor Yellow
|
||||
Write-Host ""
|
||||
Write-Host " # With certificate PFX file:" -ForegroundColor Gray
|
||||
Write-Host " `$certPass = ConvertTo-SecureString 'Password' -AsPlainText -Force" -ForegroundColor White
|
||||
Write-Host " .\Setup-WinRM-HTTPS.ps1 -CertificatePath 'C:\Certs\wildcard.pfx' ``" -ForegroundColor White
|
||||
Write-Host " -CertificatePassword `$certPass -Domain '$Domain'" -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host " # Or with existing certificate:" -ForegroundColor Gray
|
||||
Write-Host " .\Setup-WinRM-HTTPS.ps1 -CertificateThumbprint 'THUMBPRINT' -Domain '$Domain'" -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host "This will:" -ForegroundColor Yellow
|
||||
Write-Host " 1. Install/locate the wildcard certificate" -ForegroundColor White
|
||||
Write-Host " 2. Create HTTPS listener on port 5986" -ForegroundColor White
|
||||
Write-Host " 3. Configure Windows Firewall" -ForegroundColor White
|
||||
Write-Host " 4. Enable WinRM service" -ForegroundColor White
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
# Main execution
|
||||
try {
|
||||
Write-Host "=== Remote Asset Collection Script (HTTPS) ===" -ForegroundColor Cyan
|
||||
Write-Host "Starting at $(Get-Date)" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
# Initialize logging
|
||||
Initialize-Logging -LogPath $LogPath
|
||||
|
||||
# Get target computers
|
||||
$fqdns = Get-ComputerTargets -HostnameList $HostnameList -HostnameListFile $HostnameListFile -Domain $Domain
|
||||
|
||||
if ($fqdns.Count -eq 0) {
|
||||
Write-Log "No target computers specified. Use -HostnameList or -HostnameListFile parameter." $LogPath "ERROR"
|
||||
Show-SetupInstructions -Domain $Domain
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Log "Target computers (FQDNs): $($fqdns -join ', ')" $LogPath "INFO"
|
||||
|
||||
# Resolve IP addresses
|
||||
Write-Host "`nResolving IP addresses..." -ForegroundColor Yellow
|
||||
$resolvedComputers = @()
|
||||
foreach ($fqdn in $fqdns) {
|
||||
Write-Host "Resolving $fqdn..." -NoNewline
|
||||
$ip = Resolve-ComputerIP -FQDN $fqdn
|
||||
if ($ip) {
|
||||
Write-Host " [$ip]" -ForegroundColor Green
|
||||
$resolvedComputers += @{ FQDN = $fqdn; IP = $ip }
|
||||
Write-Log "Resolved $fqdn to $ip" $LogPath "INFO"
|
||||
} else {
|
||||
Write-Host " [DNS FAILED]" -ForegroundColor Red
|
||||
Write-Log "Failed to resolve $fqdn" $LogPath "WARN"
|
||||
}
|
||||
}
|
||||
|
||||
if ($resolvedComputers.Count -eq 0) {
|
||||
Write-Log "No computers could be resolved via DNS" $LogPath "ERROR"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Get credentials if not provided
|
||||
if (-not $Credential) {
|
||||
Write-Host "`nEnter credentials for remote computer access:" -ForegroundColor Yellow
|
||||
$Credential = Get-Credential
|
||||
if (-not $Credential) {
|
||||
Write-Log "No credentials provided" $LogPath "ERROR"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Test connections if requested
|
||||
if ($TestConnections) {
|
||||
Write-Host "`nTesting HTTPS connections only..." -ForegroundColor Yellow
|
||||
foreach ($comp in $resolvedComputers) {
|
||||
$fqdn = $comp.FQDN
|
||||
Write-Host "Testing $fqdn..." -NoNewline
|
||||
if (Test-WinRMHTTPSConnection -ComputerName $fqdn -Credential $Credential -Port $Port -SkipCertCheck $SkipCertificateCheck) {
|
||||
Write-Host " [OK]" -ForegroundColor Green
|
||||
Write-Log "HTTPS connection test successful for $fqdn" $LogPath "SUCCESS"
|
||||
} else {
|
||||
Write-Host " [FAIL]" -ForegroundColor Red
|
||||
Write-Log "HTTPS connection test failed for $fqdn" $LogPath "ERROR"
|
||||
}
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Validate all connections and script existence before starting collection
|
||||
Write-Host "`nValidating remote HTTPS connections and script availability..." -ForegroundColor Yellow
|
||||
$validComputers = @()
|
||||
|
||||
foreach ($comp in $resolvedComputers) {
|
||||
$fqdn = $comp.FQDN
|
||||
Write-Host "Validating $fqdn..." -NoNewline
|
||||
|
||||
if (-not (Test-WinRMHTTPSConnection -ComputerName $fqdn -Credential $Credential -Port $Port -SkipCertCheck $SkipCertificateCheck)) {
|
||||
Write-Host " [CONNECTION FAILED]" -ForegroundColor Red
|
||||
Write-Log "Cannot connect to $fqdn via WinRM HTTPS" $LogPath "ERROR"
|
||||
continue
|
||||
}
|
||||
|
||||
if (-not (Test-RemoteScriptExists -ComputerName $fqdn -Credential $Credential -ScriptPath $ScriptPath -Port $Port -SkipCertCheck $SkipCertificateCheck)) {
|
||||
Write-Host " [SCRIPT NOT FOUND]" -ForegroundColor Red
|
||||
Write-Log "Script not found on $fqdn at $ScriptPath" $LogPath "ERROR"
|
||||
continue
|
||||
}
|
||||
|
||||
Write-Host " [OK]" -ForegroundColor Green
|
||||
$validComputers += $comp
|
||||
}
|
||||
|
||||
if ($validComputers.Count -eq 0) {
|
||||
Write-Log "No valid computers found for data collection" $LogPath "ERROR"
|
||||
Show-SetupInstructions -Domain $Domain
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Log "Valid computers for collection: $($validComputers.FQDN -join ', ')" $LogPath "INFO"
|
||||
|
||||
# Execute asset collection
|
||||
Write-Host "`nStarting asset collection on $($validComputers.Count) computers..." -ForegroundColor Cyan
|
||||
Write-Host "Max concurrent sessions: $MaxConcurrent" -ForegroundColor Gray
|
||||
Write-Host "Using HTTPS on port: $Port" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
$results = @()
|
||||
$jobs = @()
|
||||
$completed = 0
|
||||
|
||||
# Process computers in batches
|
||||
for ($i = 0; $i -lt $validComputers.Count; $i += $MaxConcurrent) {
|
||||
$batch = $validComputers[$i..($i + $MaxConcurrent - 1)]
|
||||
|
||||
Write-Host "Processing batch: $($batch.FQDN -join ', ')" -ForegroundColor Yellow
|
||||
|
||||
# Start jobs for current batch
|
||||
foreach ($comp in $batch) {
|
||||
$fqdn = $comp.FQDN
|
||||
|
||||
$job = Start-Job -ScriptBlock {
|
||||
param($FQDN, $Credential, $ScriptPath, $ProxyURL, $DashboardURL, $SkipWarranty, $Port, $SkipCertCheck, $LogPath, $Functions)
|
||||
|
||||
# Import functions into job scope
|
||||
Invoke-Expression $Functions
|
||||
|
||||
Invoke-RemoteAssetScript -ComputerName $FQDN -Credential $Credential `
|
||||
-ScriptPath $ScriptPath -ProxyURL $ProxyURL -DashboardURL $DashboardURL `
|
||||
-SkipWarranty $SkipWarranty -Port $Port -SkipCertCheck $SkipCertCheck -LogPath $LogPath
|
||||
|
||||
} -ArgumentList $fqdn, $Credential, $ScriptPath, $ProxyURL, $DashboardURL, $SkipWarranty, $Port, $SkipCertificateCheck, $LogPath, (Get-Content $PSCommandPath | Out-String)
|
||||
|
||||
$jobs += $job
|
||||
}
|
||||
|
||||
# Wait for batch to complete
|
||||
$jobs | Wait-Job | Out-Null
|
||||
|
||||
# Collect results
|
||||
foreach ($job in $jobs) {
|
||||
$result = Receive-Job $job
|
||||
$results += $result
|
||||
Remove-Job $job
|
||||
$completed++
|
||||
|
||||
$computer = $result.Computer
|
||||
if ($result.Success) {
|
||||
Write-Host "[OK] $computer - Completed successfully" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "[FAIL] $computer - Failed: $($result.Message)" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
$jobs = @()
|
||||
Write-Host "Batch completed. Progress: $completed/$($validComputers.Count)" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
# Summary
|
||||
$successful = ($results | Where-Object { $_.Success }).Count
|
||||
$failed = ($results | Where-Object { -not $_.Success }).Count
|
||||
|
||||
Write-Host "=== Collection Summary ===" -ForegroundColor Cyan
|
||||
Write-Host "Total computers: $($validComputers.Count)" -ForegroundColor White
|
||||
Write-Host "Successful: $successful" -ForegroundColor Green
|
||||
Write-Host "Failed: $failed" -ForegroundColor Red
|
||||
|
||||
if ($failed -gt 0) {
|
||||
Write-Host "`nFailed computers:" -ForegroundColor Yellow
|
||||
$results | Where-Object { -not $_.Success } | ForEach-Object {
|
||||
Write-Host " $($_.Computer): $($_.Message)" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
Write-Log "Collection completed. Success: $successful, Failed: $failed" $LogPath "INFO"
|
||||
|
||||
} catch {
|
||||
Write-Log "Fatal error: $($_.Exception.Message)" $LogPath "ERROR"
|
||||
exit 1
|
||||
}
|
||||
@@ -1,484 +0,0 @@
|
||||
#Requires -RunAsAdministrator
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Remotely executes asset collection script on shopfloor PCs using WinRM.
|
||||
|
||||
.DESCRIPTION
|
||||
This script uses WinRM to remotely execute the Update-PC-CompleteAsset.ps1 script
|
||||
on multiple shopfloor PCs. It handles:
|
||||
1. WinRM configuration and trusted hosts setup
|
||||
2. Credential management for remote connections
|
||||
3. Parallel or sequential execution across multiple PCs
|
||||
4. Error handling and logging for remote operations
|
||||
5. Collection of results from each remote PC
|
||||
|
||||
.PARAMETER ComputerList
|
||||
Array of computer names or IP addresses to collect data from.
|
||||
|
||||
.PARAMETER ComputerListFile
|
||||
Path to a text file containing computer names/IPs (one per line).
|
||||
|
||||
.PARAMETER Credential
|
||||
PSCredential object for authenticating to remote computers.
|
||||
If not provided, will prompt for credentials.
|
||||
|
||||
.PARAMETER MaxConcurrent
|
||||
Maximum number of concurrent remote sessions (default: 5).
|
||||
|
||||
.PARAMETER ProxyURL
|
||||
URL for the warranty proxy server (passed to remote script).
|
||||
|
||||
.PARAMETER DashboardURL
|
||||
URL for the dashboard API (passed to remote script).
|
||||
|
||||
.PARAMETER SkipWarranty
|
||||
Skip warranty lookups on remote PCs (passed to remote script).
|
||||
|
||||
.PARAMETER LogPath
|
||||
Path for log files (default: .\logs\remote-collection.log).
|
||||
|
||||
.PARAMETER TestConnections
|
||||
Test remote connections without running the full collection.
|
||||
|
||||
.PARAMETER ScriptPath
|
||||
Path to the Update-PC-CompleteAsset.ps1 script on remote computers.
|
||||
Default: C:\Scripts\Update-PC-CompleteAsset.ps1
|
||||
|
||||
.EXAMPLE
|
||||
# Collect from specific computers with prompted credentials
|
||||
.\Invoke-RemoteAssetCollection.ps1 -ComputerList @("10.48.130.100", "10.48.130.101")
|
||||
|
||||
.EXAMPLE
|
||||
# Collect from computers listed in file with stored credentials
|
||||
$cred = Get-Credential
|
||||
.\Invoke-RemoteAssetCollection.ps1 -ComputerListFile ".\shopfloor-pcs.txt" -Credential $cred
|
||||
|
||||
.EXAMPLE
|
||||
# Test connections only
|
||||
.\Invoke-RemoteAssetCollection.ps1 -ComputerList @("10.48.130.100") -TestConnections
|
||||
|
||||
.NOTES
|
||||
Author: System Administrator
|
||||
Date: 2025-09-26
|
||||
Version: 1.0
|
||||
|
||||
Prerequisites:
|
||||
1. WinRM must be enabled on target computers
|
||||
2. PowerShell remoting must be enabled on target computers
|
||||
3. Update-PC-CompleteAsset.ps1 must be present on target computers
|
||||
4. Credentials with admin rights on target computers
|
||||
|
||||
WinRM Setup Commands (run on management server):
|
||||
Enable-PSRemoting -Force
|
||||
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force
|
||||
|
||||
WinRM Setup Commands (run on target computers):
|
||||
Enable-PSRemoting -Force
|
||||
Set-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)" -Enabled True
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string[]]$ComputerList = @(),
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$ComputerListFile,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[PSCredential]$Credential,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[int]$MaxConcurrent = 5,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$ProxyURL = "http://10.48.130.158/vendor-api-proxy.php",
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$DashboardURL = "https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp",
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[switch]$SkipWarranty = $true,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$LogPath = ".\logs\remote-collection.log",
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[switch]$TestConnections = $false,
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$ScriptPath = "C:\Scripts\Update-PC-CompleteAsset.ps1"
|
||||
)
|
||||
|
||||
# =============================================================================
|
||||
# SSL/TLS Certificate Bypass for HTTPS connections
|
||||
# =============================================================================
|
||||
# This allows connections to servers with self-signed or untrusted certificates
|
||||
try {
|
||||
# For PowerShell 5.x - use .NET callback
|
||||
if (-not ([System.Management.Automation.PSTypeName]'TrustAllCertsPolicy').Type) {
|
||||
Add-Type @"
|
||||
using System.Net;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
public class TrustAllCertsPolicy : ICertificatePolicy {
|
||||
public bool CheckValidationResult(
|
||||
ServicePoint srvPoint, X509Certificate certificate,
|
||||
WebRequest request, int certificateProblem) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
"@
|
||||
}
|
||||
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
|
||||
} catch {
|
||||
# Silently continue if already set
|
||||
}
|
||||
|
||||
# Set TLS 1.2 as minimum (required for modern HTTPS)
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
# Initialize logging
|
||||
function Initialize-Logging {
|
||||
param([string]$LogPath)
|
||||
|
||||
$logDir = Split-Path $LogPath -Parent
|
||||
if (-not (Test-Path $logDir)) {
|
||||
New-Item -ItemType Directory -Path $logDir -Force | Out-Null
|
||||
}
|
||||
|
||||
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
|
||||
Add-Content -Path $LogPath -Value "[$timestamp] Remote asset collection started"
|
||||
}
|
||||
|
||||
function Write-Log {
|
||||
param([string]$Message, [string]$LogPath, [string]$Level = "INFO")
|
||||
|
||||
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
|
||||
$logEntry = "[$timestamp] [$Level] $Message"
|
||||
|
||||
Add-Content -Path $LogPath -Value $logEntry
|
||||
|
||||
switch ($Level) {
|
||||
"ERROR" { Write-Host $logEntry -ForegroundColor Red }
|
||||
"WARN" { Write-Host $logEntry -ForegroundColor Yellow }
|
||||
"SUCCESS" { Write-Host $logEntry -ForegroundColor Green }
|
||||
default { Write-Host $logEntry -ForegroundColor White }
|
||||
}
|
||||
}
|
||||
|
||||
function Get-ComputerTargets {
|
||||
param([string[]]$ComputerList, [string]$ComputerListFile)
|
||||
|
||||
$targets = @()
|
||||
|
||||
# Add computers from direct list
|
||||
if ($ComputerList.Count -gt 0) {
|
||||
$targets += $ComputerList
|
||||
}
|
||||
|
||||
# Add computers from file
|
||||
if (-not [string]::IsNullOrEmpty($ComputerListFile)) {
|
||||
if (Test-Path $ComputerListFile) {
|
||||
$fileTargets = Get-Content $ComputerListFile | Where-Object { $_.Trim() -ne "" -and -not $_.StartsWith("#") }
|
||||
$targets += $fileTargets
|
||||
} else {
|
||||
Write-Log "Computer list file not found: $ComputerListFile" $LogPath "ERROR"
|
||||
}
|
||||
}
|
||||
|
||||
# Remove duplicates and return
|
||||
return ($targets | Sort-Object -Unique)
|
||||
}
|
||||
|
||||
function Test-WinRMConnection {
|
||||
param([string]$ComputerName, [PSCredential]$Credential)
|
||||
|
||||
try {
|
||||
$session = New-PSSession -ComputerName $ComputerName -Credential $Credential -ErrorAction Stop
|
||||
Remove-PSSession $session
|
||||
return $true
|
||||
}
|
||||
catch {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
function Test-RemoteScriptExists {
|
||||
param([string]$ComputerName, [PSCredential]$Credential, [string]$ScriptPath)
|
||||
|
||||
try {
|
||||
$result = Invoke-Command -ComputerName $ComputerName -Credential $Credential -ScriptBlock {
|
||||
param($Path)
|
||||
Test-Path $Path
|
||||
} -ArgumentList $ScriptPath
|
||||
|
||||
return $result
|
||||
}
|
||||
catch {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-RemoteAssetScript {
|
||||
param(
|
||||
[string]$ComputerName,
|
||||
[PSCredential]$Credential,
|
||||
[string]$ScriptPath,
|
||||
[string]$ProxyURL,
|
||||
[string]$DashboardURL,
|
||||
[bool]$SkipWarranty,
|
||||
[string]$LogPath
|
||||
)
|
||||
|
||||
try {
|
||||
Write-Log "Starting asset collection on $ComputerName" $LogPath "INFO"
|
||||
|
||||
# Execute the script remotely
|
||||
$result = Invoke-Command -ComputerName $ComputerName -Credential $Credential -ScriptBlock {
|
||||
param($ScriptPath, $ProxyURL, $DashboardURL, $SkipWarranty)
|
||||
|
||||
# Change to script directory
|
||||
$scriptDir = Split-Path $ScriptPath -Parent
|
||||
Set-Location $scriptDir
|
||||
|
||||
# Build parameters
|
||||
$params = @{
|
||||
ProxyURL = $ProxyURL
|
||||
DashboardURL = $DashboardURL
|
||||
}
|
||||
|
||||
if ($SkipWarranty) {
|
||||
$params.SkipWarranty = $true
|
||||
}
|
||||
|
||||
# Execute the script and capture output
|
||||
try {
|
||||
& $ScriptPath @params
|
||||
return @{
|
||||
Success = $true
|
||||
Output = "Script completed successfully"
|
||||
Error = $null
|
||||
}
|
||||
}
|
||||
catch {
|
||||
return @{
|
||||
Success = $false
|
||||
Output = $null
|
||||
Error = $_.Exception.Message
|
||||
}
|
||||
}
|
||||
} -ArgumentList $ScriptPath, $ProxyURL, $DashboardURL, $SkipWarranty
|
||||
|
||||
if ($result.Success) {
|
||||
Write-Log "Asset collection completed successfully on $ComputerName" $LogPath "SUCCESS"
|
||||
|
||||
# Update WinRM status in database - WinRM connection was successful
|
||||
# Get the actual hostname from the remote PC (in case we connected via IP)
|
||||
try {
|
||||
$remoteHostname = Invoke-Command -ComputerName $ComputerName -Credential $Credential -ScriptBlock {
|
||||
$env:COMPUTERNAME
|
||||
} -ErrorAction SilentlyContinue
|
||||
|
||||
if ([string]::IsNullOrEmpty($remoteHostname)) {
|
||||
$remoteHostname = $ComputerName
|
||||
}
|
||||
|
||||
$winrmBody = @{
|
||||
action = "updateWinRMStatus"
|
||||
hostname = $remoteHostname
|
||||
hasWinRM = "1"
|
||||
}
|
||||
Write-Log "Updating WinRM status for hostname: $remoteHostname (connected as: $ComputerName)" $LogPath "INFO"
|
||||
$winrmResponse = Invoke-RestMethod -Uri $DashboardURL -Method Post -Body $winrmBody -ErrorAction Stop
|
||||
if ($winrmResponse.success) {
|
||||
Write-Log "WinRM status updated for $remoteHostname" $LogPath "INFO"
|
||||
} else {
|
||||
Write-Log "WinRM update response: $($winrmResponse | ConvertTo-Json -Compress)" $LogPath "WARN"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Log "Failed to update WinRM status for $ComputerName - $($_.Exception.Message)" $LogPath "WARN"
|
||||
}
|
||||
|
||||
return @{ Success = $true; Computer = $ComputerName; Message = $result.Output }
|
||||
} else {
|
||||
Write-Log "Asset collection failed on $ComputerName: $($result.Error)" $LogPath "ERROR"
|
||||
return @{ Success = $false; Computer = $ComputerName; Message = $result.Error }
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$errorMsg = "Failed to execute on $ComputerName: $($_.Exception.Message)"
|
||||
Write-Log $errorMsg $LogPath "ERROR"
|
||||
return @{ Success = $false; Computer = $ComputerName; Message = $errorMsg }
|
||||
}
|
||||
}
|
||||
|
||||
function Show-WinRMSetupInstructions {
|
||||
Write-Host "=== WinRM Setup Instructions ===" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "On Management Server (this computer):" -ForegroundColor Yellow
|
||||
Write-Host " Enable-PSRemoting -Force" -ForegroundColor White
|
||||
Write-Host " Set-Item WSMan:\localhost\Client\TrustedHosts -Value '*' -Force" -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host "On Target Computers:" -ForegroundColor Yellow
|
||||
Write-Host " Enable-PSRemoting -Force" -ForegroundColor White
|
||||
Write-Host " Set-NetFirewallRule -DisplayName 'Windows Remote Management (HTTP-In)' -Enabled True" -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host "For specific computer trust:" -ForegroundColor Yellow
|
||||
Write-Host " Set-Item WSMan:\localhost\Client\TrustedHosts -Value '10.48.130.100,10.48.130.101' -Force" -ForegroundColor White
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
# Main execution
|
||||
try {
|
||||
Write-Host "=== Remote Asset Collection Script ===" -ForegroundColor Cyan
|
||||
Write-Host "Starting at $(Get-Date)" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
# Initialize logging
|
||||
Initialize-Logging -LogPath $LogPath
|
||||
|
||||
# Get target computers
|
||||
$computers = Get-ComputerTargets -ComputerList $ComputerList -ComputerListFile $ComputerListFile
|
||||
|
||||
if ($computers.Count -eq 0) {
|
||||
Write-Log "No target computers specified. Use -ComputerList or -ComputerListFile parameter." $LogPath "ERROR"
|
||||
Show-WinRMSetupInstructions
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Log "Target computers: $($computers -join ', ')" $LogPath "INFO"
|
||||
|
||||
# Get credentials if not provided
|
||||
if (-not $Credential) {
|
||||
Write-Host "Enter credentials for remote computer access:" -ForegroundColor Yellow
|
||||
$Credential = Get-Credential
|
||||
if (-not $Credential) {
|
||||
Write-Log "No credentials provided" $LogPath "ERROR"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
# Test connections if requested
|
||||
if ($TestConnections) {
|
||||
Write-Host "`nTesting connections only..." -ForegroundColor Yellow
|
||||
foreach ($computer in $computers) {
|
||||
Write-Host "Testing $computer..." -NoNewline
|
||||
if (Test-WinRMConnection -ComputerName $computer -Credential $Credential) {
|
||||
Write-Host " [OK]" -ForegroundColor Green
|
||||
Write-Log "Connection test successful for $computer" $LogPath "SUCCESS"
|
||||
} else {
|
||||
Write-Host " [FAIL]" -ForegroundColor Red
|
||||
Write-Log "Connection test failed for $computer" $LogPath "ERROR"
|
||||
}
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Validate all connections and script existence before starting collection
|
||||
Write-Host "`nValidating remote connections and script availability..." -ForegroundColor Yellow
|
||||
$validComputers = @()
|
||||
|
||||
foreach ($computer in $computers) {
|
||||
Write-Host "Validating $computer..." -NoNewline
|
||||
|
||||
if (-not (Test-WinRMConnection -ComputerName $computer -Credential $Credential)) {
|
||||
Write-Host " [CONNECTION FAILED]" -ForegroundColor Red
|
||||
Write-Log "Cannot connect to $computer via WinRM" $LogPath "ERROR"
|
||||
continue
|
||||
}
|
||||
|
||||
if (-not (Test-RemoteScriptExists -ComputerName $computer -Credential $Credential -ScriptPath $ScriptPath)) {
|
||||
Write-Host " [SCRIPT NOT FOUND]" -ForegroundColor Red
|
||||
Write-Log "Script not found on $computer at $ScriptPath" $LogPath "ERROR"
|
||||
continue
|
||||
}
|
||||
|
||||
Write-Host " [OK]" -ForegroundColor Green
|
||||
$validComputers += $computer
|
||||
}
|
||||
|
||||
if ($validComputers.Count -eq 0) {
|
||||
Write-Log "No valid computers found for data collection" $LogPath "ERROR"
|
||||
Show-WinRMSetupInstructions
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Log "Valid computers for collection: $($validComputers -join ', ')" $LogPath "INFO"
|
||||
|
||||
# Execute asset collection
|
||||
Write-Host "`nStarting asset collection on $($validComputers.Count) computers..." -ForegroundColor Cyan
|
||||
Write-Host "Max concurrent sessions: $MaxConcurrent" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
$results = @()
|
||||
$jobs = @()
|
||||
$completed = 0
|
||||
|
||||
# Process computers in batches
|
||||
for ($i = 0; $i -lt $validComputers.Count; $i += $MaxConcurrent) {
|
||||
$batch = $validComputers[$i..($i + $MaxConcurrent - 1)]
|
||||
|
||||
Write-Host "Processing batch: $($batch -join ', ')" -ForegroundColor Yellow
|
||||
|
||||
# Start jobs for current batch
|
||||
foreach ($computer in $batch) {
|
||||
$job = Start-Job -ScriptBlock {
|
||||
param($Computer, $Credential, $ScriptPath, $ProxyURL, $DashboardURL, $SkipWarranty, $LogPath, $Functions)
|
||||
|
||||
# Import functions into job scope
|
||||
Invoke-Expression $Functions
|
||||
|
||||
Invoke-RemoteAssetScript -ComputerName $Computer -Credential $Credential `
|
||||
-ScriptPath $ScriptPath -ProxyURL $ProxyURL -DashboardURL $DashboardURL `
|
||||
-SkipWarranty $SkipWarranty -LogPath $LogPath
|
||||
|
||||
} -ArgumentList $computer, $Credential, $ScriptPath, $ProxyURL, $DashboardURL, $SkipWarranty, $LogPath, (Get-Content $PSCommandPath | Out-String)
|
||||
|
||||
$jobs += $job
|
||||
}
|
||||
|
||||
# Wait for batch to complete
|
||||
$jobs | Wait-Job | Out-Null
|
||||
|
||||
# Collect results
|
||||
foreach ($job in $jobs) {
|
||||
$result = Receive-Job $job
|
||||
$results += $result
|
||||
Remove-Job $job
|
||||
$completed++
|
||||
|
||||
$computer = $result.Computer
|
||||
if ($result.Success) {
|
||||
Write-Host "[✓] $computer - Completed successfully" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "[✗] $computer - Failed: $($result.Message)" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
$jobs = @()
|
||||
Write-Host "Batch completed. Progress: $completed/$($validComputers.Count)" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
# Summary
|
||||
$successful = ($results | Where-Object { $_.Success }).Count
|
||||
$failed = ($results | Where-Object { -not $_.Success }).Count
|
||||
|
||||
Write-Host "=== Collection Summary ===" -ForegroundColor Cyan
|
||||
Write-Host "Total computers: $($validComputers.Count)" -ForegroundColor White
|
||||
Write-Host "Successful: $successful" -ForegroundColor Green
|
||||
Write-Host "Failed: $failed" -ForegroundColor Red
|
||||
|
||||
if ($failed -gt 0) {
|
||||
Write-Host "`nFailed computers:" -ForegroundColor Yellow
|
||||
$results | Where-Object { -not $_.Success } | ForEach-Object {
|
||||
Write-Host " $($_.Computer): $($_.Message)" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
Write-Log "Collection completed. Success: $successful, Failed: $failed" $LogPath "INFO"
|
||||
|
||||
} catch {
|
||||
Write-Log "Fatal error: $($_.Exception.Message)" $LogPath "ERROR"
|
||||
exit 1
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
#Requires -RunAsAdministrator
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Sets up WinRM configuration for remote asset collection.
|
||||
|
||||
.DESCRIPTION
|
||||
This script configures WinRM settings to enable remote PowerShell execution
|
||||
for asset collection across shopfloor computers.
|
||||
|
||||
.PARAMETER TrustedHosts
|
||||
Comma-separated list of trusted hosts (IP addresses or computer names).
|
||||
Use "*" to trust all hosts (less secure but simpler).
|
||||
|
||||
.PARAMETER TestConnection
|
||||
Test WinRM connection to specified computers after setup.
|
||||
|
||||
.EXAMPLE
|
||||
.\Setup-WinRM.ps1 -TrustedHosts "10.48.130.100,10.48.130.101"
|
||||
|
||||
.EXAMPLE
|
||||
.\Setup-WinRM.ps1 -TrustedHosts "*"
|
||||
|
||||
.NOTES
|
||||
Author: System Administrator
|
||||
Date: 2025-09-26
|
||||
Version: 1.0
|
||||
#>
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$TrustedHosts = "",
|
||||
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string[]]$TestConnection = @()
|
||||
)
|
||||
|
||||
function Show-WinRMStatus {
|
||||
Write-Host "=== Current WinRM Configuration ===" -ForegroundColor Cyan
|
||||
|
||||
try {
|
||||
$winrmStatus = Get-Service WinRM
|
||||
Write-Host "WinRM Service Status: $($winrmStatus.Status)" -ForegroundColor $(if($winrmStatus.Status -eq 'Running') {'Green'} else {'Red'})
|
||||
|
||||
$listeners = winrm enumerate winrm/config/listener
|
||||
Write-Host "WinRM Listeners: $($listeners.Count) configured" -ForegroundColor Gray
|
||||
|
||||
$trustedHosts = (Get-Item WSMan:\localhost\Client\TrustedHosts).Value
|
||||
Write-Host "Current Trusted Hosts: $trustedHosts" -ForegroundColor Gray
|
||||
|
||||
} catch {
|
||||
Write-Host "Error checking WinRM status: $($_.Exception.Message)" -ForegroundColor Red
|
||||
}
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
function Enable-WinRMConfiguration {
|
||||
param([string]$TrustedHosts)
|
||||
|
||||
Write-Host "=== Configuring WinRM ===" -ForegroundColor Cyan
|
||||
|
||||
try {
|
||||
# Enable PowerShell Remoting
|
||||
Write-Host "Enabling PowerShell Remoting..." -ForegroundColor Yellow
|
||||
Enable-PSRemoting -Force -SkipNetworkProfileCheck
|
||||
Write-Host "[OK] PowerShell Remoting enabled" -ForegroundColor Green
|
||||
|
||||
# Start WinRM service
|
||||
Write-Host "Starting WinRM service..." -ForegroundColor Yellow
|
||||
Start-Service WinRM
|
||||
Set-Service WinRM -StartupType Automatic
|
||||
Write-Host "[OK] WinRM service started and set to automatic" -ForegroundColor Green
|
||||
|
||||
# Configure trusted hosts if specified
|
||||
if (-not [string]::IsNullOrEmpty($TrustedHosts)) {
|
||||
Write-Host "Setting trusted hosts to: $TrustedHosts" -ForegroundColor Yellow
|
||||
Set-Item WSMan:\localhost\Client\TrustedHosts -Value $TrustedHosts -Force
|
||||
Write-Host "[OK] Trusted hosts configured" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "[SKIP] No trusted hosts specified" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Configure firewall
|
||||
Write-Host "Configuring Windows Firewall..." -ForegroundColor Yellow
|
||||
try {
|
||||
Set-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)" -Enabled True
|
||||
Write-Host "[OK] Firewall rule enabled" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host "[WARN] Could not configure firewall rule: $($_.Exception.Message)" -ForegroundColor Yellow
|
||||
}
|
||||
|
||||
# Set authentication
|
||||
Write-Host "Configuring authentication..." -ForegroundColor Yellow
|
||||
Set-Item WSMan:\localhost\Service\Auth\Basic -Value $true
|
||||
Set-Item WSMan:\localhost\Service\Auth\CredSSP -Value $true
|
||||
Write-Host "[OK] Authentication configured" -ForegroundColor Green
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "WinRM configuration completed successfully!" -ForegroundColor Green
|
||||
|
||||
} catch {
|
||||
Write-Host "Error configuring WinRM: $($_.Exception.Message)" -ForegroundColor Red
|
||||
return $false
|
||||
}
|
||||
|
||||
return $true
|
||||
}
|
||||
|
||||
function Test-WinRMConnections {
|
||||
param([string[]]$Computers)
|
||||
|
||||
if ($Computers.Count -eq 0) {
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "=== Testing WinRM Connections ===" -ForegroundColor Cyan
|
||||
|
||||
$credential = Get-Credential -Message "Enter credentials for testing remote connections"
|
||||
if (-not $credential) {
|
||||
Write-Host "No credentials provided for testing" -ForegroundColor Yellow
|
||||
return
|
||||
}
|
||||
|
||||
foreach ($computer in $Computers) {
|
||||
Write-Host "Testing connection to $computer..." -NoNewline
|
||||
|
||||
try {
|
||||
$session = New-PSSession -ComputerName $computer -Credential $credential -ErrorAction Stop
|
||||
Remove-PSSession $session
|
||||
Write-Host " [OK]" -ForegroundColor Green
|
||||
} catch {
|
||||
Write-Host " [FAIL] $($_.Exception.Message)" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
function Show-NextSteps {
|
||||
Write-Host "=== Next Steps ===" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "1. Ensure target computers have WinRM enabled:" -ForegroundColor Yellow
|
||||
Write-Host " Run this script on each target computer:" -ForegroundColor White
|
||||
Write-Host " .\Setup-WinRM.ps1" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
Write-Host "2. Create your computer list file:" -ForegroundColor Yellow
|
||||
Write-Host " Copy shopfloor-pcs-example.txt to shopfloor-pcs.txt" -ForegroundColor White
|
||||
Write-Host " Edit the file to include your actual computer IP addresses" -ForegroundColor White
|
||||
Write-Host ""
|
||||
Write-Host "3. Test connections:" -ForegroundColor Yellow
|
||||
Write-Host " .\Invoke-RemoteAssetCollection.ps1 -ComputerList @('10.48.130.100') -TestConnections" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
Write-Host "4. Run asset collection:" -ForegroundColor Yellow
|
||||
Write-Host " .\Invoke-RemoteAssetCollection.ps1 -ComputerListFile .\shopfloor-pcs.txt" -ForegroundColor Gray
|
||||
Write-Host " or" -ForegroundColor White
|
||||
Write-Host " .\Run-RemoteCollection.bat" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
# Main execution
|
||||
try {
|
||||
Write-Host "=== WinRM Setup Script ===" -ForegroundColor Cyan
|
||||
Write-Host "Date: $(Get-Date)" -ForegroundColor Gray
|
||||
Write-Host ""
|
||||
|
||||
# Show current status
|
||||
Show-WinRMStatus
|
||||
|
||||
# Configure WinRM
|
||||
$success = Enable-WinRMConfiguration -TrustedHosts $TrustedHosts
|
||||
|
||||
if ($success) {
|
||||
# Show updated status
|
||||
Show-WinRMStatus
|
||||
|
||||
# Test connections if requested
|
||||
if ($TestConnection.Count -gt 0) {
|
||||
Test-WinRMConnections -Computers $TestConnection
|
||||
}
|
||||
|
||||
# Show next steps
|
||||
Show-NextSteps
|
||||
}
|
||||
|
||||
} catch {
|
||||
Write-Host "Fatal error: $($_.Exception.Message)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
# Test script for ShopDB API connectivity and functionality
|
||||
# Tests the new Phase 2 ASP API endpoint
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$false)]
|
||||
[string]$DashboardURL = "http://192.168.122.151:8080/api.asp"
|
||||
)
|
||||
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host "ShopDB API Connection Test" -ForegroundColor Cyan
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Test 1: Basic connectivity
|
||||
Write-Host "Test 1: Basic API Connectivity" -ForegroundColor Yellow
|
||||
try {
|
||||
$response = Invoke-RestMethod -Uri "$DashboardURL?action=getDashboardData" -Method Get -TimeoutSec 10
|
||||
if ($response.success) {
|
||||
Write-Host " [OK] API is online" -ForegroundColor Green
|
||||
Write-Host " Message: $($response.message)" -ForegroundColor Gray
|
||||
Write-Host " Version: $($response.version)" -ForegroundColor Gray
|
||||
Write-Host " Schema: $($response.schema)" -ForegroundColor Gray
|
||||
} else {
|
||||
Write-Host " [FAIL] API responded but not successful" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
} catch {
|
||||
Write-Host " [FAIL] Cannot reach API: $($_.Exception.Message)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
# Test 2: INSERT new PC
|
||||
Write-Host "Test 2: INSERT New PC Record" -ForegroundColor Yellow
|
||||
$testHostname = "TEST-PS-" + (Get-Random -Minimum 1000 -Maximum 9999)
|
||||
$testSerial = "SER-" + (Get-Random -Minimum 100000 -Maximum 999999)
|
||||
|
||||
try {
|
||||
$postData = @{
|
||||
action = 'updateCompleteAsset'
|
||||
hostname = $testHostname
|
||||
serialNumber = $testSerial
|
||||
manufacturer = 'Dell'
|
||||
model = 'OptiPlex 7090'
|
||||
pcType = 'Standard'
|
||||
loggedInUser = 'testuser'
|
||||
osVersion = 'Windows 10 Pro'
|
||||
}
|
||||
|
||||
$response = Invoke-RestMethod -Uri $DashboardURL -Method Post -Body $postData -TimeoutSec 30
|
||||
|
||||
if ($response.success) {
|
||||
Write-Host " [OK] PC record created successfully" -ForegroundColor Green
|
||||
Write-Host " Hostname: $testHostname" -ForegroundColor Gray
|
||||
Write-Host " Machine ID: $($response.machineid)" -ForegroundColor Gray
|
||||
Write-Host " Operation: $($response.operation)" -ForegroundColor Gray
|
||||
$machineId = $response.machineid
|
||||
} else {
|
||||
Write-Host " [FAIL] Failed to create PC: $($response.error)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
} catch {
|
||||
Write-Host " [FAIL] Error creating PC: $($_.Exception.Message)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
# Test 3: UPDATE existing PC
|
||||
Write-Host "Test 3: UPDATE Existing PC Record" -ForegroundColor Yellow
|
||||
$updatedSerial = "SER-UPDATED-" + (Get-Random -Minimum 100000 -Maximum 999999)
|
||||
|
||||
try {
|
||||
$postData = @{
|
||||
action = 'updateCompleteAsset'
|
||||
hostname = $testHostname
|
||||
serialNumber = $updatedSerial
|
||||
manufacturer = 'Dell'
|
||||
model = 'OptiPlex 7090'
|
||||
pcType = 'Engineer' # Changed type
|
||||
loggedInUser = 'updateduser'
|
||||
osVersion = 'Windows 10 Enterprise'
|
||||
}
|
||||
|
||||
$response = Invoke-RestMethod -Uri $DashboardURL -Method Post -Body $postData -TimeoutSec 30
|
||||
|
||||
if ($response.success) {
|
||||
Write-Host " [OK] PC record updated successfully" -ForegroundColor Green
|
||||
Write-Host " Hostname: $testHostname" -ForegroundColor Gray
|
||||
Write-Host " Machine ID: $($response.machineid)" -ForegroundColor Gray
|
||||
Write-Host " Serial Updated: $updatedSerial" -ForegroundColor Gray
|
||||
} else {
|
||||
Write-Host " [FAIL] Failed to update PC: $($response.error)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
} catch {
|
||||
Write-Host " [FAIL] Error updating PC: $($_.Exception.Message)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
# Test 4: INSERT Shopfloor PC with network interfaces
|
||||
Write-Host "Test 4: INSERT Shopfloor PC with Network Data" -ForegroundColor Yellow
|
||||
$shopfloorHostname = "SHOPFLOOR-TEST-" + (Get-Random -Minimum 1000 -Maximum 9999)
|
||||
$shopfloorSerial = "SER-SF-" + (Get-Random -Minimum 100000 -Maximum 999999)
|
||||
|
||||
try {
|
||||
$networkInterfaces = @(
|
||||
@{
|
||||
InterfaceName = "Ethernet0"
|
||||
IPAddress = "192.168.1.100"
|
||||
SubnetMask = 24
|
||||
MACAddress = "00-11-22-33-44-55"
|
||||
IsDHCP = 0
|
||||
IsMachineNetwork = 1
|
||||
},
|
||||
@{
|
||||
InterfaceName = "Ethernet1"
|
||||
IPAddress = "10.48.130.50"
|
||||
SubnetMask = 24
|
||||
MACAddress = "00-11-22-33-44-66"
|
||||
IsDHCP = 1
|
||||
IsMachineNetwork = 0
|
||||
}
|
||||
) | ConvertTo-Json -Compress
|
||||
|
||||
$postData = @{
|
||||
action = 'updateCompleteAsset'
|
||||
hostname = $shopfloorHostname
|
||||
serialNumber = $shopfloorSerial
|
||||
manufacturer = 'Dell'
|
||||
model = 'OptiPlex 7060'
|
||||
pcType = 'Shopfloor'
|
||||
loggedInUser = 'shopfloor'
|
||||
osVersion = 'Windows 10 Enterprise LTSC'
|
||||
machineNo = 'M123'
|
||||
networkInterfaces = $networkInterfaces
|
||||
}
|
||||
|
||||
$response = Invoke-RestMethod -Uri $DashboardURL -Method Post -Body $postData -TimeoutSec 30
|
||||
|
||||
if ($response.success) {
|
||||
Write-Host " [OK] Shopfloor PC created with network data" -ForegroundColor Green
|
||||
Write-Host " Hostname: $shopfloorHostname" -ForegroundColor Gray
|
||||
Write-Host " Machine ID: $($response.machineid)" -ForegroundColor Gray
|
||||
Write-Host " Network Interfaces: $($response.data.networkInterfaces)" -ForegroundColor Gray
|
||||
Write-Host " Machine No: M123" -ForegroundColor Gray
|
||||
} else {
|
||||
Write-Host " [FAIL] Failed to create shopfloor PC: $($response.error)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
} catch {
|
||||
Write-Host " [FAIL] Error creating shopfloor PC: $($_.Exception.Message)" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host "All Tests PASSED!" -ForegroundColor Green
|
||||
Write-Host "========================================" -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
Write-Host "Summary:" -ForegroundColor Yellow
|
||||
Write-Host " - API connectivity verified" -ForegroundColor White
|
||||
Write-Host " - INSERT operations working" -ForegroundColor White
|
||||
Write-Host " - UPDATE operations working" -ForegroundColor White
|
||||
Write-Host " - Shopfloor PC with network data working" -ForegroundColor White
|
||||
Write-Host " - Phase 2 schema validated" -ForegroundColor White
|
||||
Write-Host ""
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
||||
@echo off
|
||||
powershell -ExecutionPolicy Bypass -File "%~dp0Update-PC-Minimal.ps1"
|
||||
echo.
|
||||
echo Log saved to: %TEMP%\shopdb-update.log
|
||||
echo.
|
||||
pause
|
||||
@@ -1,510 +0,0 @@
|
||||
# Minimal PC data collection script
|
||||
# For locked-down PCs with restricted permissions
|
||||
|
||||
# SSL/TLS Certificate Bypass for HTTPS connections
|
||||
try {
|
||||
if (-not ([System.Management.Automation.PSTypeName]'TrustAllCertsPolicy').Type) {
|
||||
Add-Type @"
|
||||
using System.Net;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
public class TrustAllCertsPolicy : ICertificatePolicy {
|
||||
public bool CheckValidationResult(
|
||||
ServicePoint srvPoint, X509Certificate certificate,
|
||||
WebRequest request, int certificateProblem) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
"@
|
||||
}
|
||||
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
|
||||
} catch { }
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
$apiUrl = "https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp"
|
||||
$logFile = "$env:TEMP\shopdb-update.log"
|
||||
|
||||
# Start fresh log
|
||||
"$(Get-Date) - Starting minimal PC update" | Out-File $logFile
|
||||
|
||||
$data = @{
|
||||
action = 'updateCompleteAsset'
|
||||
hostname = $env:COMPUTERNAME
|
||||
manufacturer = 'Unknown'
|
||||
model = 'Unknown'
|
||||
serialNumber = 'Unknown'
|
||||
pcType = 'Measuring' # Default, will be updated if PC-DMIS is found
|
||||
}
|
||||
|
||||
"Hostname: $($data.hostname)" | Tee-Object -FilePath $logFile -Append
|
||||
|
||||
# Try to get serial number
|
||||
try {
|
||||
$bios = Get-CimInstance -ClassName Win32_BIOS -ErrorAction Stop
|
||||
$data.serialNumber = $bios.SerialNumber
|
||||
"Serial: $($data.serialNumber)" | Tee-Object -FilePath $logFile -Append
|
||||
} catch {
|
||||
"ERROR getting serial: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
# Try to get manufacturer/model
|
||||
try {
|
||||
$cs = Get-CimInstance -ClassName Win32_ComputerSystem -ErrorAction Stop
|
||||
$data.manufacturer = $cs.Manufacturer
|
||||
$data.model = $cs.Model
|
||||
"Manufacturer: $($data.manufacturer)" | Tee-Object -FilePath $logFile -Append
|
||||
"Model: $($data.model)" | Tee-Object -FilePath $logFile -Append
|
||||
} catch {
|
||||
"ERROR getting system info: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
# Get IP address using ipconfig (no elevated permissions required)
|
||||
$interfaces = @()
|
||||
try {
|
||||
$ipconfig = ipconfig /all
|
||||
$currentIP = ""
|
||||
$currentMAC = ""
|
||||
|
||||
foreach ($line in $ipconfig) {
|
||||
if ($line -match '^\S') {
|
||||
# New adapter section - save previous if valid
|
||||
if ($currentIP -and $currentIP -notlike '127.*' -and $currentIP -notlike '169.254.*') {
|
||||
$interfaces += @{
|
||||
IPAddress = $currentIP
|
||||
MACAddress = $currentMAC
|
||||
}
|
||||
"IP: $currentIP | MAC: $currentMAC" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
$currentIP = ""
|
||||
$currentMAC = ""
|
||||
}
|
||||
elseif ($line -match 'IPv4 Address.*:\s*(\d+\.\d+\.\d+\.\d+)') {
|
||||
$currentIP = $matches[1] -replace '\(Preferred\)',''
|
||||
}
|
||||
elseif ($line -match 'Physical Address.*:\s*([0-9A-F-]+)') {
|
||||
$currentMAC = $matches[1] -replace '-',':'
|
||||
}
|
||||
}
|
||||
# Don't forget the last adapter
|
||||
if ($currentIP -and $currentIP -notlike '127.*' -and $currentIP -notlike '169.254.*') {
|
||||
$interfaces += @{
|
||||
IPAddress = $currentIP
|
||||
MACAddress = $currentMAC
|
||||
}
|
||||
"IP: $currentIP | MAC: $currentMAC" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
} catch {
|
||||
"ERROR getting network info: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
if ($interfaces.Count -gt 0) {
|
||||
$data.networkInterfaces = ($interfaces | ConvertTo-Json -Compress)
|
||||
}
|
||||
|
||||
# Try to get OS and last boot time
|
||||
try {
|
||||
$os = Get-CimInstance -ClassName Win32_OperatingSystem -ErrorAction Stop
|
||||
$data.osVersion = $os.Caption
|
||||
"OS: $($data.osVersion)" | Tee-Object -FilePath $logFile -Append
|
||||
|
||||
# Get last boot time
|
||||
if ($os.LastBootUpTime) {
|
||||
$data.lastBootUpTime = $os.LastBootUpTime.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
"Last Boot: $($data.lastBootUpTime)" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
} catch {
|
||||
"ERROR getting OS: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
# Try to get logged in user
|
||||
try {
|
||||
$data.loggedInUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
||||
"User: $($data.loggedInUser)" | Tee-Object -FilePath $logFile -Append
|
||||
} catch {
|
||||
"ERROR getting user: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
# Try to get machine number (no admin required for reading HKLM)
|
||||
try {
|
||||
$machineNo = $null
|
||||
|
||||
# Primary location: GE Aircraft Engines DNC registry (64-bit and 32-bit)
|
||||
$regPaths = @(
|
||||
"HKLM:\SOFTWARE\GE Aircraft Engines\DNC\General",
|
||||
"HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines\DNC\General"
|
||||
)
|
||||
|
||||
foreach ($regPath in $regPaths) {
|
||||
if (Test-Path $regPath) {
|
||||
$regValue = (Get-ItemProperty -Path $regPath -Name "MachineNo" -ErrorAction SilentlyContinue).MachineNo
|
||||
if ($regValue) {
|
||||
$machineNo = $regValue
|
||||
"Machine # from registry ($regPath): $machineNo" | Tee-Object -FilePath $logFile -Append
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Fall back to DNC.ini file
|
||||
if (-not $machineNo) {
|
||||
$dncIniPath = "C:\DNC\DNC.ini"
|
||||
if (Test-Path $dncIniPath) {
|
||||
$iniContent = Get-Content $dncIniPath -Raw -ErrorAction SilentlyContinue
|
||||
if ($iniContent -match 'MachineNo\s*=\s*(.+)') {
|
||||
$machineNo = $matches[1].Trim()
|
||||
"Machine # from DNC.ini: $machineNo" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($machineNo) {
|
||||
# Check if machine number is a generic/placeholder value
|
||||
# These should not be sent to API - must be set manually
|
||||
# Generic machine numbers - don't send to API but can help identify PC type
|
||||
$genericMachineTypes = @{
|
||||
"^WJPRT" = "Measuring" # Generic printer/measuring tool
|
||||
"^WJCMM" = "CMM" # Generic CMM
|
||||
"^WJMEAS" = "Measuring" # Generic measuring
|
||||
"^0600$" = "Wax Trace" # Wax trace machines
|
||||
"^0612$" = "Part Marker" # Part markers
|
||||
"^0613$" = "Part Marker" # Part markers
|
||||
"^0615" = "Part Marker" # Part markers
|
||||
"^8003$" = "Part Marker" # Part markers
|
||||
"^TEST" = $null # Test machines - no type hint
|
||||
"^TEMP" = $null # Temporary - no type hint
|
||||
"^DEFAULT"= $null # Default value - no type hint
|
||||
"^0+$" = $null # All zeros - no type hint
|
||||
}
|
||||
|
||||
$isGeneric = $false
|
||||
$genericTypeHint = $null
|
||||
foreach ($pattern in $genericMachineTypes.Keys) {
|
||||
if ($machineNo -match $pattern) {
|
||||
$isGeneric = $true
|
||||
$genericTypeHint = $genericMachineTypes[$pattern]
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if ($isGeneric) {
|
||||
if ($genericTypeHint) {
|
||||
"Machine # '$machineNo' is generic ($genericTypeHint) - NOT sending to API (requires manual assignment)" | Tee-Object -FilePath $logFile -Append
|
||||
# Store the type hint for later use in PC type detection
|
||||
$script:genericTypeHint = $genericTypeHint
|
||||
} else {
|
||||
"Machine # '$machineNo' is generic/placeholder - NOT sending to API (requires manual assignment)" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
# Don't set $data.machineNo - leave it out of API call
|
||||
} else {
|
||||
$data.machineNo = $machineNo
|
||||
}
|
||||
} else {
|
||||
"No machine number found" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
} catch {
|
||||
"ERROR getting machine number: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
# Check for VNC installation
|
||||
try {
|
||||
$hasVnc = $false
|
||||
|
||||
# Check registry for installed programs (both 32-bit and 64-bit)
|
||||
$regPaths = @(
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
|
||||
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
||||
)
|
||||
|
||||
foreach ($path in $regPaths) {
|
||||
if (Test-Path $path) {
|
||||
$apps = Get-ItemProperty $path -ErrorAction SilentlyContinue |
|
||||
Where-Object { $_.DisplayName -like "*VNC Server*" -or $_.DisplayName -like "*VNC Connect*" -or $_.DisplayName -like "*RealVNC*" }
|
||||
if ($apps) {
|
||||
$hasVnc = $true
|
||||
"VNC detected: $($apps.DisplayName -join ', ')" | Tee-Object -FilePath $logFile -Append
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Also check for VNC service
|
||||
if (-not $hasVnc) {
|
||||
$vncService = Get-Service -Name "vncserver*" -ErrorAction SilentlyContinue
|
||||
if ($vncService) {
|
||||
$hasVnc = $true
|
||||
"VNC service detected: $($vncService.Name)" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
}
|
||||
|
||||
if ($hasVnc) {
|
||||
$data.hasVnc = "1"
|
||||
} else {
|
||||
$data.hasVnc = "0"
|
||||
"No VNC detected" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
} catch {
|
||||
"ERROR checking VNC: $_" | Tee-Object -FilePath $logFile -Append
|
||||
$data.hasVnc = "0"
|
||||
}
|
||||
|
||||
# Check for WinRM status
|
||||
try {
|
||||
$hasWinRM = $false
|
||||
|
||||
# Check if WinRM service is running
|
||||
$winrmService = Get-Service -Name "WinRM" -ErrorAction SilentlyContinue
|
||||
if ($winrmService -and $winrmService.Status -eq "Running") {
|
||||
# Also verify WinRM is configured to accept connections
|
||||
try {
|
||||
$winrmConfig = winrm get winrm/config/service 2>$null
|
||||
if ($winrmConfig -match "AllowRemoteAccess\s*=\s*true") {
|
||||
$hasWinRM = $true
|
||||
"WinRM enabled and accepting connections" | Tee-Object -FilePath $logFile -Append
|
||||
} else {
|
||||
"WinRM service running but remote access not enabled" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
} catch {
|
||||
# If we can't check config, assume it's enabled if service is running
|
||||
$hasWinRM = $true
|
||||
"WinRM service running (config check skipped)" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
} else {
|
||||
"WinRM service not running" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
if ($hasWinRM) {
|
||||
$data.hasWinRM = "1"
|
||||
} else {
|
||||
$data.hasWinRM = "0"
|
||||
}
|
||||
} catch {
|
||||
"ERROR checking WinRM: $_" | Tee-Object -FilePath $logFile -Append
|
||||
$data.hasWinRM = "0"
|
||||
}
|
||||
|
||||
# Load applications.csv for app matching
|
||||
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$csvPath = Join-Path $scriptDir "applications.csv"
|
||||
$appMappings = @()
|
||||
|
||||
if (Test-Path $csvPath) {
|
||||
try {
|
||||
$appMappings = Import-Csv $csvPath | Where-Object { $_.enabled -eq "1" -and $_.app_id }
|
||||
"Loaded $($appMappings.Count) app mappings from CSV" | Tee-Object -FilePath $logFile -Append
|
||||
} catch {
|
||||
"ERROR loading applications.csv: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
} else {
|
||||
"WARNING: applications.csv not found at $csvPath" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
# Get installed applications from registry and match against CSV
|
||||
$matchedApps = @()
|
||||
$hasPcDmis = $false
|
||||
$hasFormTracePak = $false
|
||||
$hasKeyence = $false
|
||||
$hasEAS1000 = $false
|
||||
$hasGoCMM = $false
|
||||
$hasDODA = $false
|
||||
$hasFormStatusMonitor = $false
|
||||
$hasGageCal = $false
|
||||
$hasNISoftware = $false
|
||||
$hasGenspect = $false
|
||||
$hasHeatTreat = $false
|
||||
try {
|
||||
$regPaths = @(
|
||||
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
|
||||
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
||||
)
|
||||
|
||||
# Get all installed apps
|
||||
$installedApps = @()
|
||||
foreach ($path in $regPaths) {
|
||||
if (Test-Path $path) {
|
||||
$apps = Get-ItemProperty $path -ErrorAction SilentlyContinue |
|
||||
Where-Object { $_.DisplayName -and $_.DisplayName.Trim() -ne "" }
|
||||
foreach ($app in $apps) {
|
||||
$installedApps += @{
|
||||
DisplayName = $app.DisplayName.Trim()
|
||||
Version = if ($app.DisplayVersion) { $app.DisplayVersion.Trim() } else { "" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"Found $($installedApps.Count) installed applications" | Tee-Object -FilePath $logFile -Append
|
||||
|
||||
# Match against CSV patterns
|
||||
foreach ($mapping in $appMappings) {
|
||||
$patterns = $mapping.search_patterns -split '\|'
|
||||
foreach ($installedApp in $installedApps) {
|
||||
$matched = $false
|
||||
foreach ($pattern in $patterns) {
|
||||
if ($installedApp.DisplayName -match $pattern) {
|
||||
$matched = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
if ($matched) {
|
||||
# Avoid duplicates
|
||||
if (-not ($matchedApps | Where-Object { $_.appid -eq $mapping.app_id })) {
|
||||
$matchedApps += @{
|
||||
appid = [int]$mapping.app_id
|
||||
appname = $mapping.app_name
|
||||
version = $installedApp.Version
|
||||
}
|
||||
"$($mapping.app_name) (ID:$($mapping.app_id)) detected: $($installedApp.DisplayName)" | Tee-Object -FilePath $logFile -Append
|
||||
|
||||
# Check for PC type indicators
|
||||
switch ($mapping.app_name) {
|
||||
"PC-DMIS" { $hasPcDmis = $true }
|
||||
"goCMM" { $hasGoCMM = $true }
|
||||
"DODA" { $hasDODA = $true }
|
||||
"FormTracePak" { $hasFormTracePak = $true }
|
||||
"FormStatusMonitor" { $hasFormStatusMonitor = $true }
|
||||
"Keyence VR Series" { $hasKeyence = $true }
|
||||
"GageCal" { $hasGageCal = $true }
|
||||
"NI Software" { $hasNISoftware = $true }
|
||||
"Genspect" { $hasGenspect = $true }
|
||||
"HeatTreat" { $hasHeatTreat = $true }
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"Matched $($matchedApps.Count) tracked applications" | Tee-Object -FilePath $logFile -Append
|
||||
|
||||
if ($matchedApps.Count -gt 0) {
|
||||
$data.installedApps = ($matchedApps | ConvertTo-Json -Compress)
|
||||
}
|
||||
} catch {
|
||||
"ERROR getting installed apps: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
# File path fallbacks for apps that may not be in registry
|
||||
# Check PC-DMIS
|
||||
if (-not $hasPcDmis) {
|
||||
try {
|
||||
$pcDmisPaths = @(
|
||||
"C:\ProgramData\Hexagon\PC-DMIS*",
|
||||
"C:\Program Files\Hexagon\PC-DMIS*",
|
||||
"C:\Program Files (x86)\Hexagon\PC-DMIS*",
|
||||
"C:\Program Files\WAI\PC-DMIS*",
|
||||
"C:\Program Files (x86)\WAI\PC-DMIS*"
|
||||
)
|
||||
foreach ($dmisPath in $pcDmisPaths) {
|
||||
if (Test-Path $dmisPath) {
|
||||
$hasPcDmis = $true
|
||||
"PC-DMIS found at: $dmisPath" | Tee-Object -FilePath $logFile -Append
|
||||
break
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
"ERROR checking PC-DMIS paths: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
}
|
||||
|
||||
# Check UDC if not already matched
|
||||
if (-not ($matchedApps | Where-Object { $_.appid -eq 2 })) {
|
||||
if (Test-Path "C:\Program Files\UDC") {
|
||||
$matchedApps += @{ appid = 2; appname = "UDC"; version = "" }
|
||||
"UDC found at: C:\Program Files\UDC" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
}
|
||||
|
||||
# Check eDNC if not already matched
|
||||
if (-not ($matchedApps | Where-Object { $_.appid -eq 8 })) {
|
||||
if (Test-Path "C:\Program Files (x86)\DNC") {
|
||||
$matchedApps += @{ appid = 8; appname = "eDNC"; version = "" }
|
||||
"eDNC found at: C:\Program Files (x86)\DNC" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
}
|
||||
|
||||
# Check FormTracePak if not already matched
|
||||
if (-not $hasFormTracePak) {
|
||||
try {
|
||||
$formTracePaths = @(
|
||||
"C:\Program Files\MitutoyoApp*",
|
||||
"C:\Program Files (x86)\MitutoyoApp*"
|
||||
)
|
||||
foreach ($ftPath in $formTracePaths) {
|
||||
if (Test-Path $ftPath) {
|
||||
$hasFormTracePak = $true
|
||||
if (-not ($matchedApps | Where-Object { $_.appid -eq 76 })) {
|
||||
$matchedApps += @{ appid = 76; appname = "FormTracePak"; version = "" }
|
||||
}
|
||||
"FormTracePak found at: $ftPath" | Tee-Object -FilePath $logFile -Append
|
||||
break
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
"ERROR checking FormTracePak paths: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
}
|
||||
|
||||
# Update installedApps data if we found more apps via file paths
|
||||
if ($matchedApps.Count -gt 0) {
|
||||
$data.installedApps = ($matchedApps | ConvertTo-Json -Compress)
|
||||
}
|
||||
|
||||
# Set PC type based on application detection
|
||||
# Priority: CMM > Wax Trace > Keyence > EAS1000 > Genspect > Heat Treat > Generic hint > default Shopfloor
|
||||
$isCMM = ($hasPcDmis -or $hasGoCMM -or $hasDODA)
|
||||
$isWaxTrace = ($hasFormTracePak -or $hasFormStatusMonitor)
|
||||
$isEAS1000 = ($hasGageCal -or $hasNISoftware)
|
||||
|
||||
if ($isCMM) {
|
||||
$data.pcType = "CMM"
|
||||
$detected = @()
|
||||
if ($hasPcDmis) { $detected += "PC-DMIS" }
|
||||
if ($hasGoCMM) { $detected += "goCMM" }
|
||||
if ($hasDODA) { $detected += "DODA" }
|
||||
"PC Type set to: CMM ($($detected -join ', '))" | Tee-Object -FilePath $logFile -Append
|
||||
} elseif ($isWaxTrace) {
|
||||
$data.pcType = "Wax Trace"
|
||||
$detected = @()
|
||||
if ($hasFormTracePak) { $detected += "FormTracePak" }
|
||||
if ($hasFormStatusMonitor) { $detected += "FormStatusMonitor" }
|
||||
"PC Type set to: Wax Trace ($($detected -join ', '))" | Tee-Object -FilePath $logFile -Append
|
||||
} elseif ($hasKeyence) {
|
||||
$data.pcType = "Keyence"
|
||||
"PC Type set to: Keyence (Keyence VR Series)" | Tee-Object -FilePath $logFile -Append
|
||||
} elseif ($isEAS1000) {
|
||||
$data.pcType = "EAS1000"
|
||||
$detected = @()
|
||||
if ($hasGageCal) { $detected += "GageCal" }
|
||||
if ($hasNISoftware) { $detected += "NI Software" }
|
||||
"PC Type set to: EAS1000 ($($detected -join ', '))" | Tee-Object -FilePath $logFile -Append
|
||||
} elseif ($hasGenspect) {
|
||||
$data.pcType = "Genspect"
|
||||
"PC Type set to: Genspect" | Tee-Object -FilePath $logFile -Append
|
||||
} elseif ($hasHeatTreat) {
|
||||
$data.pcType = "Heat Treat"
|
||||
"PC Type set to: Heat Treat" | Tee-Object -FilePath $logFile -Append
|
||||
} elseif ($script:genericTypeHint) {
|
||||
# Use generic machine number hint when no software detected
|
||||
$data.pcType = $script:genericTypeHint
|
||||
"PC Type set to: $($script:genericTypeHint) (from generic machine # - requires manual assignment)" | Tee-Object -FilePath $logFile -Append
|
||||
} else {
|
||||
$data.pcType = "Shopfloor"
|
||||
"No specialized apps detected, defaulting to: Shopfloor" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
# Send to API
|
||||
"Sending to API: $apiUrl" | Tee-Object -FilePath $logFile -Append
|
||||
|
||||
try {
|
||||
$response = Invoke-RestMethod -Uri $apiUrl -Method Post -Body $data -ErrorAction Stop
|
||||
"API Response: $($response | ConvertTo-Json -Compress)" | Tee-Object -FilePath $logFile -Append
|
||||
|
||||
if ($response.success) {
|
||||
"SUCCESS - MachineID: $($response.machineid)" | Tee-Object -FilePath $logFile -Append
|
||||
} else {
|
||||
"FAILED - $($response.message)" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
} catch {
|
||||
"ERROR calling API: $_" | Tee-Object -FilePath $logFile -Append
|
||||
}
|
||||
|
||||
"$(Get-Date) - Done" | Tee-Object -FilePath $logFile -Append
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
||||
app_name,app_id,search_patterns,description,enabled
|
||||
UDC,2,"Universal Data Collection","Universal Data Collection - Primary shopfloor application",1
|
||||
CLM,4,"PPDCS","Legacy UDC/PPDCS application",1
|
||||
PPDCS,4,"PPDCS","Legacy UDC/PPDCS application (alias)",1
|
||||
Oracle,7,"OracleDatabase|Oracle Database|Oracle.*Database","Oracle Database installations",1
|
||||
Tanium,30,"^Tanium Client","Tanium Client - Software Deployment and Bitlocker Keys",1
|
||||
PC-DMIS,6,"PC-DMIS|PCDMIS","PC-DMIS CMM Measurement Software",1
|
||||
OpenText,22,"OpenText|CSF","OpenText CSF Document Management",1
|
||||
eDNC,8,"eDNC","Enhanced DNC - CNC File Transfer",1
|
||||
FormTracePak,76,"FormTracePak|Formtracepak|Form Trace|FormTrace","FormTracePak Wax Trace Inspection Software",1
|
||||
Keyence VR Series,69,"VR-3000|VR-5000|VR-6000|KEYENCE VR","Keyence VR Series 3D Measurement Software",1
|
||||
Genspect,70,"Genspect","Genspect Inspection Software",1
|
||||
GageCal,71,"GageCal","GageCal Gage Calibration Software (EAS1000)",1
|
||||
NI Software,72,"NI-|National Instruments|NI System|NI Measurement|NI LabVIEW|NI Package|NI Certificates|NI Logos|NI Trace|NI mDNS|NI Auth|NI Network|NI Service","National Instruments Software Suite",1
|
||||
goCMM,73,"goCMM","goCMM - CMM Companion Software",1
|
||||
DODA,74,"Dovetail Digital Analysis|DODA","Dovetail Digital Analysis Software (CMM)",1
|
||||
FormStatusMonitor,75,"FormStatusMonitor","FormStatusMonitor - Wax Trace Companion Software",1
|
||||
HeatTreat,77,"HeatTreat","Heat Treat monitoring and control software",1
|
||||
Java,,"Java|JavaRuntimeEnvironment","Java Runtime Environment",0
|
||||
Chrome,,"Google Chrome","Google Chrome browser",0
|
||||
Office,,"Microsoft Office","Microsoft Office suite",0
|
||||
VNC,,"VNC|RealVNC","VNC remote access software",0
|
||||
|
@@ -1,262 +0,0 @@
|
||||
=====================================
|
||||
Complete PC Asset Collection - Fri 12/05/2025 10:08:27.70
|
||||
Computer: G1CXL1V3ESF
|
||||
User Context: lg672650sd
|
||||
Script Directory: S:\DT\cameron\scan
|
||||
Proxy: http://10.48.130.158/vendor-api-proxy.php
|
||||
Dashboard: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
Network Load Balancing: Disabled
|
||||
=====================================
|
||||
|
||||
Checking for GE Aircraft Engines registry...
|
||||
Backup-GERegistry.ps1 not found - skipping registry backup
|
||||
|
||||
|
||||
=== Running PowerShell script ===
|
||||
|
||||
========================================
|
||||
Complete PC Asset Collection & Storage
|
||||
========================================
|
||||
Computer: G1CXL1V3ESF
|
||||
Log file: S:\DT\cameron\scan\logs\Update-PC-CompleteAsset-2025-12-05.log
|
||||
Using provided URL: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
Dashboard: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
Note: Warranty lookups disabled (handled by dashboard)
|
||||
|
||||
=== STEP 1: COLLECT SYSTEM INFO ===
|
||||
Collecting comprehensive system information...
|
||||
Domain detected: logon.ds.ge.com
|
||||
[OK] Shopfloor domain detected
|
||||
[OK] PC-DMIS detected - CMM PC
|
||||
Skipping application detection (PC Type: CMM)
|
||||
Collecting installed applications...
|
||||
Found 123 installed applications:
|
||||
- 64 Bit HP CIO Components Installer (v22.2.1)
|
||||
- Adobe Acrobat Reader DC (v15.017.20050)
|
||||
- Adobe AcrobatReaderDC-Shopfloor XI V01 (vadobe_acrobatreaderdc-shopfloor_xi_v01 Build 0.0.0.0)
|
||||
- BIG-IP Edge Client (v71.2019.0119.0331)
|
||||
- BIG-IP Edge Client Components (All Users) (v71.2019.0119.0331)
|
||||
- Cisco PEAP Module (v1.1.6)
|
||||
- Classic Shell (v4.3.1)
|
||||
- CLM 1.7 64-bit (v1.7.25.0)
|
||||
- Compatibility Pack for the 2007 Office system (v12.0.6021.5000)
|
||||
- GE NOMSAgentServiceInstaller 1.0 V01 (vge_nomsagentserviceinstaller_1.0_v01 Build 0.0.0.0)
|
||||
- GE SFLD GPOUpdate 1.0 V01 (vge_sfld-gpoupdate_1.0_v01 Build 0.0.0.0)
|
||||
- GE Tanium Health Check (v1.07)
|
||||
- goCMM (v1.1.6718.31289)
|
||||
- Google Chrome (v142.0.7444.176)
|
||||
- Google Chrome 50 V01 (vgoogle_chrome_50_v01 Build 0.0.0.0)
|
||||
- Google Endpoint Verification (v2.11.28)
|
||||
- Google Legacy Browser Support (v8.1.0.0)
|
||||
- Herramientas de correcci¢n de Microsoft Office 2016: espa¤ol (v16.0.4266.1001)
|
||||
- InternetExplorer-SF8 (v1.0.0)
|
||||
- IvoSoft ClassicShell 4.3.1 V01 (vivosoft_classicshell_4.3.1_v01 Build 0.0.0.0)
|
||||
- Japan Fonts (v2.2)
|
||||
- Java 8 Update 101 (v8.0.1010.13)
|
||||
- Maxx Audio Installer (x64) (v2.7.13058.0)
|
||||
- Microsoft Access MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Access Runtime 2016 (v16.0.4288.1001)
|
||||
- Microsoft Access Runtime MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Access Setup Metadata MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft ASP.NET MVC 2 (v2.0.60926.0)
|
||||
- Microsoft DCF MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Edge (v143.0.3650.66)
|
||||
- Microsoft Edge WebView2 Runtime (v142.0.3595.94)
|
||||
- Microsoft Excel MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Groove MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft InfoPath MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Office 2007-2010 Compatibility Pack
|
||||
- Microsoft Office 2010 Viewers (vmicrosoft_office_2010_viewers_v5 Build 1.1.0.9)
|
||||
- Microsoft Office 2016 x86 MSI 16.0.4266.1001 V04 (vmicrosoft_office2016x86-msi_16.0.4266.1001_v04 Build 0.0.0.0)
|
||||
- Microsoft Office 64-bit Components 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Excel Viewer (v12.0.6219.1000)
|
||||
- Microsoft Office OSM MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Office OSM UX MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Office Professional Plus 2016 (v16.0.4266.1001)
|
||||
- Microsoft Office Proofing (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Office Proofing Tools 2016 - English (v16.0.4266.1001)
|
||||
- Microsoft Office Shared 64-bit MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Shared 64-bit Setup Metadata MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Shared MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Shared Setup Metadata MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Word Viewer 2003 (v11.0.8173.0)
|
||||
- Microsoft OneNote MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Outlook MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft PowerPoint MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Publisher MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Skype for Business MUI (English) 2016 (v16.0.4266.1001)
|
||||
- Microsoft Visual C++ 2005 Redistributable (v8.0.56336)
|
||||
- Microsoft Visual C++ 2010 x64 Redistributable - 10.0.40219 (v10.0.40219)
|
||||
- Microsoft Visual C++ 2012 Redistributable (x64) - 11.0.51106 (v11.0.51106.1)
|
||||
- Microsoft Visual C++ 2012 x64 Additional Runtime - 11.0.51106 (v11.0.51106)
|
||||
- Microsoft Visual C++ 2012 x64 Minimum Runtime - 11.0.51106 (v11.0.51106)
|
||||
- Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.22.27821 (v14.22.27821.0)
|
||||
- Microsoft Visual C++ 2015-2019 Redistributable (x86) - 14.22.27821 (v14.22.27821.0)
|
||||
- Microsoft Visual C++ 2019 X64 Additional Runtime - 14.22.27821 (v14.22.27821)
|
||||
- Microsoft Visual C++ 2019 X64 Minimum Runtime - 14.22.27821 (v14.22.27821)
|
||||
- Microsoft Visual C++ 2019 X86 Additional Runtime - 14.22.27821 (v14.22.27821)
|
||||
- Microsoft Visual C++ 2019 X86 Minimum Runtime - 14.22.27821 (v14.22.27821)
|
||||
- Microsoft Word MUI (English) 2016 (v16.0.4266.1001)
|
||||
- MyTech Assistant 6.0.7 (v6.0.7)
|
||||
- NOMS (v1.0.0)
|
||||
- NVIDIA Graphics Driver 528.95 (v528.95)
|
||||
- NVIDIA HD Audio Driver 1.3.39.16 (v1.3.39.16)
|
||||
- NVIDIA Install Application (v2.1002.382.0)
|
||||
- NVIDIA RTX Desktop Manager 204.26 (v204.26)
|
||||
- OpenText Host Explorer - ShopFloor 15 SP1 V01 (vopentext_hostexplorer-shopfloor_15sp1_v01 Build 0.0.0.0)
|
||||
- OpenText HostExplorer 15 x64 (v15.0.1)
|
||||
- Oracle JavaRuntimeEnvironment 8u101 V01 (voracle_javaruntimeenvironment_8u101_v01 Build 0.0.0.0)
|
||||
- Oracle OracleDatabase 11r2 V03 (voracle_oracledatabase_11r2_v03 Build 0.0.0.0)
|
||||
- Outils de v‚rification linguistique 2016 de Microsoft Officeÿ- Fran‡ais (v16.0.4266.1001)
|
||||
- PC-DMIS 2019 R2 64-bit (v14.2.728.0)
|
||||
- Realtek Audio COM Components (v1.0.2)
|
||||
- Realtek High Definition Audio Driver (v6.0.9175.1)
|
||||
- RealVNC Connect 6.0.1 V03 (vrealvnc_connect_6.0.1_v03 Build 0.0.0.0)
|
||||
- Security Update for Microsoft Access 2016 (KB5002720) 32-Bit Edition
|
||||
- Security Update for Microsoft Excel 2016 (KB5002794) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB2920704) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB2920727) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB3085538) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB3114690) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB3191869) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB3213551) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4011574) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4462148) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4464583) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4475581) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4475587) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4484103) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4484432) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5001941) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002058) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002112) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002341) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002573) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002575) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002576) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002616) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002719) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002757) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002762) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002766) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002792) 32-Bit Edition
|
||||
- Security Update for Microsoft OneNote 2016 (KB5002622) 32-Bit Edition
|
||||
- Security Update for Microsoft Outlook 2016 (KB5002683) 32-Bit Edition
|
||||
- Security Update for Microsoft PowerPoint 2016 (KB5002790) 32-Bit Edition
|
||||
- Security Update for Microsoft Project 2016 (KB5002561) 32-Bit Edition
|
||||
- Security Update for Microsoft Publisher 2016 (KB5002566) 32-Bit Edition
|
||||
- Security Update for Microsoft Visio 2016 (KB5002634) 32-Bit Edition
|
||||
- Security Update for Microsoft Word 2016 (KB5002789) 32-Bit Edition
|
||||
- Security Update for Skype for Business 2016 (KB5002181) 32-Bit Edition
|
||||
- Setup (v1.1.6710.18601)
|
||||
- Tanium Client 7.4.7.1179 (v7.4.7.1179)
|
||||
- Universal Updater 1.4 64-bit (v1.4.669.0)
|
||||
- Update for Microsoft Visio Viewer 2016 (KB2920709) 32-Bit Edition
|
||||
- VNC Server 6.0.1 (v6.0.1.23971)
|
||||
- VNC Viewer 6.0.1 (v6.0.1.23971)
|
||||
Loaded 9 enabled applications from CSV
|
||||
Matched: OpenText (ID:22) = OpenText Host Explorer - ShopFloor 15 SP1 V01 vopentext_hostexplorer-shopfloor_15sp1_v01 Build 0.0.0.0
|
||||
Skipping duplicate: OpenText (ID:22) = OpenText HostExplorer 15 x64
|
||||
Matched: Oracle (ID:7) = Oracle OracleDatabase 11r2 V03 voracle_oracledatabase_11r2_v03 Build 0.0.0.0
|
||||
Matched: PC-DMIS (ID:6) = PC-DMIS 2019 R2 64-bit v14.2.728.0
|
||||
Matched: Tanium (ID:30) = Tanium Client 7.4.7.1179 v7.4.7.1179
|
||||
Found 4 tracked applications for database
|
||||
Running processes:
|
||||
AggregatorHost, armsvc, backgroundTaskHost, ClassicStartMenu, cmd, conhost, cscript, csrss, ctfmon, dllhost, dwm, explorer, F5CredMgrSrv, F5FltSrv, F5InstallerService, F5TrafficSrv, FNPLicensingService64, fontdrvhost, Idle, IntelAudioService, lsass, Memory Compression, mobsync, MpDefenderCoreService, msdtc, MsMpEng, MTA.Controller, NetworkAdapterManager, NisSrv, noms_agent, NVDisplay.Container, nvWmi64, pacjsworker, powershell, RAVBg64, Registry, RtkAudioService64, RtkNGUI64, rundll32, RuntimeBroker, SchTasks, SearchApp, SearchFilterHost, SearchIndexer, SearchProtocolHost, SecurityHealthService, SecurityHealthSystray, services, sihost, smartscreen, smss, spoolsv, sppsvc, StartMenuExperienceHost, svchost, System, TaniumClient, TaniumCX, TaniumDriverSvc, taskhostw, TbtP2pShortcutService, TextInputHost, unsecapp, userinit, UserOOBEBroker, vncagent, vncserver, vncserverui, WavesSysSvc64, wininit, winlogon, WmiPrvSE, WUDFHost
|
||||
System Details:
|
||||
Hostname: G1CXL1V3ESF
|
||||
Manufacturer: Dell Inc.
|
||||
Model: Precision 5820 Tower
|
||||
Serial: 1CXL1V3
|
||||
PC Type: CMM
|
||||
User: lg672650sd
|
||||
Memory: 63.69 GB
|
||||
OS: Microsoft Windows 10 Enterprise LTSC
|
||||
|
||||
=== STEP 2: COLLECT SHOPFLOOR INFO ===
|
||||
|
||||
=== STEP 3: WARRANTY DATA ===
|
||||
Warranty lookups disabled - Dashboard will handle warranty updates
|
||||
PCs cannot reach proxy server from this network
|
||||
|
||||
=== STEP 4: STORE IN DATABASE ===
|
||||
Sending complete asset data to dashboard...
|
||||
Dashboard URL: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
No ShopfloorInfo available
|
||||
No installed applications to send
|
||||
[OK] Complete asset data stored in database!
|
||||
PCID: Unknown
|
||||
Updated/Created: Unknown
|
||||
Records affected: Unknown
|
||||
|
||||
=== STEP 5: PRINTER MAPPING ===
|
||||
Collecting default printer information...
|
||||
Default Printer: \\tsgwp00525.rd.ds.ge.com\4250@CSF02
|
||||
Port Name: 10.80.92.65
|
||||
[OK] Network printer detected - will send to database
|
||||
Sending printer mapping to dashboard...
|
||||
Hostname: G1CXL1V3ESF
|
||||
Printer FQDN: 10.80.92.65
|
||||
DEBUG Response: {"success":true,"message":"Printer mapping updated","printerId":22,"machinesUpdated":1,"matchMethod":"ip"}
|
||||
[OK] Printer mapping updated successfully!
|
||||
Printer ID:
|
||||
Machines Updated:
|
||||
Match Method:
|
||||
|
||||
=== STEP 6: APPLICATION MAPPING ===
|
||||
Sending tracked applications to dashboard...
|
||||
Hostname: G1CXL1V3ESF
|
||||
Tracked Apps: 4
|
||||
-> appid=22, appname='OpenText', version='opentext_hostexplorer-shopfloor_15sp1_v01 Build 0.0.0.0'
|
||||
-> appid=7, appname='Oracle', version='oracle_oracledatabase_11r2_v03 Build 0.0.0.0'
|
||||
-> appid=6, appname='PC-DMIS', version='14.2.728.0'
|
||||
-> appid=30, appname='Tanium', version='7.4.7.1179'
|
||||
DEBUG JSON: [{"appid":22,"appname":"OpenText","version":"opentext_hostexplorer-shopfloor_15sp1_v01 Build 0.0.0.0","displayname":"OpenText Host Explorer - ShopFloor 15 SP1 V01"},{"appid":7,"appname":"Oracle","version":"oracle_oracledatabase_11r2_v03 Build 0.0.0.0","displayname":"Oracle OracleDatabase 11r2 V03"},{"appid":6,"appname":"PC-DMIS","version":"14.2.728.0","displayname":"PC-DMIS 2019 R2 64-bit"},{"appid":30,"appname":"Tanium","version":"7.4.7.1179","displayname":"Tanium Client 7.4.7.1179"}]
|
||||
[OK] Installed applications updated successfully!
|
||||
Apps Processed: 4
|
||||
Machine ID: 5792
|
||||
|
||||
=== STEP 7: WINRM CONFIGURATION ===
|
||||
Resetting WinRM configuration...
|
||||
Checking network profile...
|
||||
Interface 'logon.ds.ge.com': DomainAuthenticated
|
||||
Interface 'Unidentified network': Public
|
||||
Checking for machine network interfaces...
|
||||
Checking domain trust relationship...
|
||||
[OK] Domain trust relationship is healthy
|
||||
Found Public network profile(s), attempting to fix...
|
||||
Restarting NLA service to detect domain...
|
||||
[FAIL] Error configuring WinRM: Time out has expired and the operation has not been completed.
|
||||
|
||||
=== STEP 8: WINRM ADMIN GROUP ===
|
||||
Configuring WinRM access groups...
|
||||
Target group: logon\g03078610
|
||||
Checking local Administrators group...
|
||||
Current Administrators members: W9_Root, Domain Admins, S-1-5-21-3672398596-3227583511-885490141-3021858, W10_ShopAdmin, 212788513, 212718962, 210050215, 210050230, 212732582, lg044513sd, g03078399, g01127734, g01127722, DEL_GE000000000_GE001000000_WKS_ADMINS_US
|
||||
Adding logon\g03078610 to Administrators...
|
||||
[OK] Added logon\g03078610 to Administrators
|
||||
Checking Remote Management Users group...
|
||||
Current Remote Management Users members:
|
||||
Adding logon\g03078610 to Remote Management Users...
|
||||
[OK] Added logon\g03078610 to Remote Management Users
|
||||
|
||||
=== COMPLETE ASSET UPDATE SUCCESS ===
|
||||
Computer: G1CXL1V3ESF
|
||||
Type: CMM
|
||||
Serial: 1CXL1V3
|
||||
|
||||
Data Collected & Stored:
|
||||
[OK] Basic system information
|
||||
[OK] Default printer mapping (10.80.92.65)
|
||||
[OK] Application mapping (4 tracked apps)
|
||||
[WARN] WinRM configuration (may need manual setup)
|
||||
[OK] WinRM admin group (logon\g03078610)
|
||||
|
||||
[OK] Complete PC asset collection finished!
|
||||
All data stored in database via dashboard API.
|
||||
Log file: S:\DT\cameron\scan\logs\Update-PC-CompleteAsset-2025-12-05.log
|
||||
|
||||
=== Script completed ===
|
||||
Exit code: 0
|
||||
End time: Fri 12/05/2025 10:09:49.55
|
||||
|
||||
@@ -1,238 +0,0 @@
|
||||
=====================================
|
||||
Complete PC Asset Collection - Fri 12/05/2025 12:20:52.90
|
||||
Computer: G1ZTNCX3ESF
|
||||
User Context: lg672650sd
|
||||
Script Directory: S:\DT\cameron\scan
|
||||
Proxy: http://10.48.130.158/vendor-api-proxy.php
|
||||
Dashboard: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
Network Load Balancing: Disabled
|
||||
=====================================
|
||||
|
||||
Checking for GE Aircraft Engines registry...
|
||||
Backup-GERegistry.ps1 not found - skipping registry backup
|
||||
|
||||
|
||||
=== Running PowerShell script ===
|
||||
|
||||
========================================
|
||||
Complete PC Asset Collection & Storage
|
||||
========================================
|
||||
Computer: G1ZTNCX3ESF
|
||||
Log file: S:\DT\cameron\scan\logs\Update-PC-CompleteAsset-2025-12-05.log
|
||||
Using provided URL: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
Dashboard: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
Note: Warranty lookups disabled (handled by dashboard)
|
||||
|
||||
=== STEP 1: COLLECT SYSTEM INFO ===
|
||||
Collecting comprehensive system information...
|
||||
Domain detected: logon.ds.ge.com
|
||||
[OK] Shopfloor domain detected
|
||||
[OK] Keyence/Genspect software detected - Keyence PC
|
||||
Skipping application detection (PC Type: Keyence)
|
||||
Collecting installed applications...
|
||||
Found 77 installed applications:
|
||||
- Adobe Acrobat Reader DC (v15.017.20050)
|
||||
- Adobe AcrobatReaderDC-Shopfloor XI V01 (vadobe_acrobatreaderdc-shopfloor_xi_v01 Build 0.0.0.0)
|
||||
- Cisco PEAP Module (v1.1.6)
|
||||
- Classic Shell (v4.3.1)
|
||||
- Compatibility Pack for the 2007 Office system (v12.0.6021.5000)
|
||||
- GE NOMSAgentServiceInstaller 1.0 V01 (vge_nomsagentserviceinstaller_1.0_v01 Build 0.0.0.0)
|
||||
- GE SFLD GPOUpdate 1.0 V01 (vge_sfld-gpoupdate_1.0_v01 Build 0.0.0.0)
|
||||
- GE Tanium Health Check (v1.07)
|
||||
- Google Chrome (v142.0.7444.176)
|
||||
- Google Chrome 50 V01 (vgoogle_chrome_50_v01 Build 0.0.0.0)
|
||||
- Google Endpoint Verification (v2.11.28)
|
||||
- Google Legacy Browser Support (v8.1.0.0)
|
||||
- InternetExplorer-SF8 (v1.0.0)
|
||||
- IvoSoft ClassicShell 4.3.1 V01 (vivosoft_classicshell_4.3.1_v01 Build 0.0.0.0)
|
||||
- Japan Fonts (v2.2)
|
||||
- Java 8 Update 101 (v8.0.1010.13)
|
||||
- Microsoft Access Runtime 2016 (v16.0.4288.1001)
|
||||
- Microsoft Access Runtime MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Edge (v142.0.3595.94)
|
||||
- Microsoft Edge WebView2 Runtime (v142.0.3595.94)
|
||||
- Microsoft Office 2007-2010 Compatibility Pack
|
||||
- Microsoft Office 2010 Viewers (vmicrosoft_office_2010_viewers_v5 Build 1.1.0.9)
|
||||
- Microsoft Office 64-bit Components 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Excel Viewer (v12.0.6219.1000)
|
||||
- Microsoft Office Shared 64-bit MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Shared 64-bit Setup Metadata MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Shared MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Shared Setup Metadata MUI (English) 2016 (v16.0.4288.1001)
|
||||
- Microsoft Office Word Viewer 2003 (v11.0.8173.0)
|
||||
- Microsoft PowerPoint Viewer (v14.0.4763.1000)
|
||||
- Microsoft Visual C++ 2010 x64 Redistributable - 10.0.40219 (v10.0.40219)
|
||||
- Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219 (v10.0.40219)
|
||||
- Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.30501 (v12.0.30501.0)
|
||||
- Microsoft Visual C++ 2013 Redistributable (x86) - 12.0.30501 (v12.0.30501.0)
|
||||
- Microsoft Visual C++ 2013 x64 Additional Runtime - 12.0.21005 (v12.0.21005)
|
||||
- Microsoft Visual C++ 2013 x64 Minimum Runtime - 12.0.21005 (v12.0.21005)
|
||||
- Microsoft Visual C++ 2013 x86 Additional Runtime - 12.0.21005 (v12.0.21005)
|
||||
- Microsoft Visual C++ 2013 x86 Minimum Runtime - 12.0.21005 (v12.0.21005)
|
||||
- Microsoft Visual C++ 2017 Redistributable (x64) - 14.16.27024 (v14.16.27024.1)
|
||||
- Microsoft Visual C++ 2017 Redistributable (x86) - 14.16.27033 (v14.16.27033.0)
|
||||
- Microsoft Visual C++ 2017 X64 Additional Runtime - 14.16.27024 (v14.16.27024)
|
||||
- Microsoft Visual C++ 2017 X64 Minimum Runtime - 14.16.27024 (v14.16.27024)
|
||||
- Microsoft Visual C++ 2017 X86 Additional Runtime - 14.16.27033 (v14.16.27033)
|
||||
- Microsoft Visual C++ 2017 X86 Minimum Runtime - 14.16.27033 (v14.16.27033)
|
||||
- NOMS (v1.0.0)
|
||||
- OpenText HostExplorer 15 x64 (v15.0.0)
|
||||
- OpenText HostExplorer SP1 15.0 V01 (vopentext_hostexplorer_sp1_15.0_v01 Build 0.0.0.0)
|
||||
- Oracle JavaRuntimeEnvironment 8u101 V01 (voracle_javaruntimeenvironment_8u101_v01 Build 0.0.0.0)
|
||||
- RealVNC Connect 6.0.1 V03 (vrealvnc_connect_6.0.1_v03 Build 0.0.0.0)
|
||||
- Security Update for Microsoft Access 2016 (KB5002720) 32-Bit Edition
|
||||
- Security Update for Microsoft Excel 2016 (KB5002794) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB3191869) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB3213551) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4011574) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4462148) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4475587) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4484103) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB4484432) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002058) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002112) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002341) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002573) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002575) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002576) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002616) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002719) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002757) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002766) 32-Bit Edition
|
||||
- Security Update for Microsoft Office 2016 (KB5002792) 32-Bit Edition
|
||||
- Security Update for Microsoft OneNote 2016 (KB5002622) 32-Bit Edition
|
||||
- Security Update for Microsoft Outlook 2016 (KB5002683) 32-Bit Edition
|
||||
- Security Update for Skype for Business 2016 (KB5002181) 32-Bit Edition
|
||||
- Tanium Client 7.4.7.1179 (v7.4.7.1179)
|
||||
- VNC Server 6.0.1 (v6.0.1.23971)
|
||||
- VNC Viewer 6.0.1 (v6.0.1.23971)
|
||||
- VR-6000 Series Software (v4.3.7)
|
||||
- Windows Driver Package - KEYENCE VR Series USB-Driver (03/26/2020 1.0.0.0) (v03/26/2020 1.0.0.0)
|
||||
Loaded 9 enabled applications from CSV
|
||||
Matched: OpenText (ID:22) = OpenText HostExplorer 15 x64 v15.0.0
|
||||
Skipping duplicate: OpenText (ID:22) = OpenText HostExplorer SP1 15.0 V01
|
||||
Matched: Tanium (ID:30) = Tanium Client 7.4.7.1179 v7.4.7.1179
|
||||
Found 2 tracked applications for database
|
||||
Running processes:
|
||||
AggregatorHost, amdfendrsr, armsvc, atieclxx, atiesrxx, chrome, ClassicStartMenu, cmd, conhost, cscript, csrss, ctfmon, dllhost, dwm, explorer, fontdrvhost, Idle, IntelCpHDCPSvc, ipf_helper, ipf_uf, jhi_service, LMS, lsass, Memory Compression, MpDefenderCoreService, msdtc, msedge, MsMpEng, MTA.Controller, mytechassistant, NetworkAdapterManager, NisSrv, noms_agent, OneApp.IGCC.WinService, pacjsworker, powershell, Registry, RtkAudUService64, RuntimeBroker, SearchApp, SearchIndexer, SecurityHealthService, SecurityHealthSystray, services, sihost, smartscreen, smss, spoolsv, StartMenuExperienceHost, svchost, System, TaniumClient, TaniumCX, TaniumDriverSvc, taskhostw, TbtP2pShortcutService, TextInputHost, unsecapp, vncagent, vncserver, vncserverui, WavesAudioService, WavesSvc64, WavesSysSvc64, WDTRpcServer, wininit, winlogon, wlanext, WmiPrvSE, WMIRegistrationService, WUDFHost
|
||||
System Details:
|
||||
Hostname: G1ZTNCX3ESF
|
||||
Manufacturer: Dell Inc.
|
||||
Model: OptiPlex 7000
|
||||
Serial: 1ZTNCX3
|
||||
PC Type: Keyence
|
||||
User: lg672650sd
|
||||
Memory: 15.7 GB
|
||||
OS: Microsoft Windows 10 Enterprise LTSC
|
||||
|
||||
=== STEP 2: COLLECT SHOPFLOOR INFO ===
|
||||
|
||||
=== STEP 3: WARRANTY DATA ===
|
||||
Warranty lookups disabled - Dashboard will handle warranty updates
|
||||
PCs cannot reach proxy server from this network
|
||||
|
||||
=== STEP 4: STORE IN DATABASE ===
|
||||
Sending complete asset data to dashboard...
|
||||
Dashboard URL: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
No ShopfloorInfo available
|
||||
No installed applications to send
|
||||
[OK] Complete asset data stored in database!
|
||||
PCID: Unknown
|
||||
Updated/Created: Unknown
|
||||
Records affected: Unknown
|
||||
|
||||
=== STEP 5: PRINTER MAPPING ===
|
||||
Collecting default printer information...
|
||||
Default Printer: WJWT05-HP-Laserjet
|
||||
Port Name: 10.80.92.67
|
||||
[OK] Network printer detected - will send to database
|
||||
Sending printer mapping to dashboard...
|
||||
Hostname: G1ZTNCX3ESF
|
||||
Printer FQDN: 10.80.92.67
|
||||
DEBUG Response: {"success":true,"message":"Printer mapping updated","printerId":9,"machinesUpdated":1,"matchMethod":"ip"}
|
||||
[OK] Printer mapping updated successfully!
|
||||
Printer ID:
|
||||
Machines Updated:
|
||||
Match Method:
|
||||
|
||||
=== STEP 6: APPLICATION MAPPING ===
|
||||
Sending tracked applications to dashboard...
|
||||
Hostname: G1ZTNCX3ESF
|
||||
Tracked Apps: 2
|
||||
-> appid=22, appname='OpenText', version='15.0.0'
|
||||
-> appid=30, appname='Tanium', version='7.4.7.1179'
|
||||
DEBUG JSON: [{"appid":22,"appname":"OpenText","version":"15.0.0","displayname":"OpenText HostExplorer 15 x64"},{"appid":30,"appname":"Tanium","version":"7.4.7.1179","displayname":"Tanium Client 7.4.7.1179"}]
|
||||
[OK] Installed applications updated successfully!
|
||||
Apps Processed: 2
|
||||
Machine ID: 5807
|
||||
|
||||
=== STEP 7: WINRM CONFIGURATION ===
|
||||
Resetting WinRM configuration...
|
||||
Checking network profile...
|
||||
Interface 'logon.ds.ge.com': DomainAuthenticated
|
||||
Checking for machine network interfaces...
|
||||
Checking domain trust relationship...
|
||||
[OK] Domain trust relationship is healthy
|
||||
[OK] All network profiles are Private/Domain
|
||||
Stopping WinRM service...
|
||||
WinRM service stopped
|
||||
Removing existing WinRM listeners...
|
||||
Existing listeners removed
|
||||
Starting WinRM service...
|
||||
WinRM service started and set to Automatic
|
||||
Running WinRM quickconfig...
|
||||
WinRM quickconfig completed
|
||||
Creating HTTP listener on port 5985...
|
||||
HTTP listener already exists
|
||||
Configuring WinRM authentication settings...
|
||||
Auth: Basic=false, Negotiate=true, Kerberos=true, CredSSP=false
|
||||
WARNING: The updated configuration might affect the operation of the plugins having a per plugin quota value greater
|
||||
than 1024. Verify the configuration of all the registered plugins and change the per plugin quota values for the
|
||||
affected plugins.
|
||||
MaxMemoryPerShellMB set to 1024
|
||||
Enabling LocalAccountTokenFilterPolicy...
|
||||
LocalAccountTokenFilterPolicy enabled
|
||||
Configuring WinRM security descriptor...
|
||||
Current SDDL: O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
|
||||
PSRemoting enabled
|
||||
Restarting WinRM service to apply changes...
|
||||
WinRM service restarted
|
||||
Configuring firewall rule...
|
||||
Firewall rule 'Windows Remote Management (HTTP-In)' enabled
|
||||
Verifying WinRM listener...
|
||||
[OK] WinRM HTTP listener configured on port 5985
|
||||
[OK] Port 5985 is listening
|
||||
|
||||
=== STEP 8: WINRM ADMIN GROUP ===
|
||||
Configuring WinRM access groups...
|
||||
Target group: logon\g03078610
|
||||
Checking local Administrators group...
|
||||
Current Administrators members: W9_Root, Domain Admins, 503432774, g01127734, g01127722, DEL_GE000000000_GE001000000_WKS_ADMINS_US, W10_ShopAdmin
|
||||
Adding logon\g03078610 to Administrators...
|
||||
[OK] Added logon\g03078610 to Administrators
|
||||
Checking Remote Management Users group...
|
||||
Current Remote Management Users members:
|
||||
Adding logon\g03078610 to Remote Management Users...
|
||||
[OK] Added logon\g03078610 to Remote Management Users
|
||||
|
||||
=== COMPLETE ASSET UPDATE SUCCESS ===
|
||||
Computer: G1ZTNCX3ESF
|
||||
Type: Keyence
|
||||
Serial: 1ZTNCX3
|
||||
|
||||
Data Collected & Stored:
|
||||
[OK] Basic system information
|
||||
[OK] Default printer mapping (10.80.92.67)
|
||||
[OK] Application mapping (2 tracked apps)
|
||||
[OK] WinRM HTTP listener (port 5985)
|
||||
Note: If remote access still fails, a reboot may be required
|
||||
[OK] WinRM admin group (logon\g03078610)
|
||||
|
||||
[OK] Complete PC asset collection finished!
|
||||
All data stored in database via dashboard API.
|
||||
Log file: S:\DT\cameron\scan\logs\Update-PC-CompleteAsset-2025-12-05.log
|
||||
|
||||
=== Script completed ===
|
||||
Exit code: 0
|
||||
End time: Fri 12/05/2025 12:21:17.60
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,360 +0,0 @@
|
||||
=====================================
|
||||
Complete PC Asset Collection - Fri 12/05/2025 13:29:36.45
|
||||
Computer: G3ZL4SZ2ESF
|
||||
User Context: lg672650sd
|
||||
Script Directory: S:\DT\cameron\scan
|
||||
Proxy: http://10.48.130.158/vendor-api-proxy.php
|
||||
Dashboard: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
Network Load Balancing: Disabled
|
||||
=====================================
|
||||
|
||||
Checking for GE Aircraft Engines registry...
|
||||
Backup-GERegistry.ps1 not found - skipping registry backup
|
||||
|
||||
|
||||
=== Running PowerShell script ===
|
||||
|
||||
========================================
|
||||
Complete PC Asset Collection & Storage
|
||||
========================================
|
||||
Computer: G3ZL4SZ2ESF
|
||||
Log file: S:\DT\cameron\scan\logs\Update-PC-CompleteAsset-2025-12-05.log
|
||||
Using provided URL: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
Dashboard: https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||
Note: Warranty lookups disabled (handled by dashboard)
|
||||
|
||||
=== STEP 1: COLLECT SYSTEM INFO ===
|
||||
Collecting comprehensive system information...
|
||||
Domain detected: logon.ds.ge.com
|
||||
[OK] Shopfloor domain detected
|
||||
[OK] Keyence/Genspect software detected - Keyence PC
|
||||
Skipping application detection (PC Type: Keyence)
|
||||
Collecting installed applications...
|
||||
Found 194 installed applications:
|
||||
- 64 Bit HP CIO Components Installer (v13.2.1)
|
||||
- Adobe Acrobat Reader DC (v15.017.20050)
|
||||
- Adobe AcrobatReaderDC-Shopfloor XI V01 (vadobe_acrobatreaderdc-shopfloor_xi_v01 Build 0.0.0.0)
|
||||
- Adobe Flash Player 32 PPAPI (v32.0.0.387)
|
||||
- BIG-IP Edge Client (v71.2019.0119.0331)
|
||||
- BIG-IP Edge Client Components (All Users) (v71.2019.0119.0331)
|
||||
- Cisco PEAP Module (v1.1.6)
|
||||
- Classic Shell (v4.3.1)
|
||||
- Compatibility Pack for the 2007 Office system (v12.0.6021.5000)
|
||||
- CrowdStrike Device Control (v7.29.20167.0)
|
||||
- CrowdStrike Firmware Analysis (v7.14.18456.0)
|
||||
- CrowdStrike Sensor Platform (v7.29.20108.0)
|
||||
- CrowdStrike Windows Sensor (v7.29.20108.0)
|
||||
- DynaComware JapanFonts 2.20 V01 (vdynacomware_japanfonts_2.20_v01 Build 0.0.0.0)
|
||||
- eDNC 6.1.4 (v6.1.4)
|
||||
- GageCal
|
||||
- GE InspiraFonts2017 April 1.0 V02 (vge_inspirafonts2017_april_1.0_v02 Build 0.0.0.0)
|
||||
- GE NOMSAgentServiceInstaller 1.0 V01 (vge_nomsagentserviceinstaller_1.0_v01 Build 0.0.0.0)
|
||||
- GE SFLD GPOUpdate 1.0 V01 (vge_sfld-gpoupdate_1.0_v01 Build 0.0.0.0)
|
||||
- GE Tanium Health Check (v1.07)
|
||||
- Genspect 2.5.31
|
||||
- Genspect 2.5.31 (C:\Program Files (x86)\Genspect\)
|
||||
- Genspect 2.5.31 (C:\Program Files (x86)\Genspect\) #3
|
||||
- Google Chrome (v142.0.7444.176)
|
||||
- Google Chrome 50 V01 (vgoogle_chrome_50_v01 Build 0.0.0.0)
|
||||
- Google Chrome 73 V01 (vgoogle_chrome_73_v01 Build 0.0.0.0)
|
||||
- InternetExplorer-SF8 (v1.0.0)
|
||||
- IvoSoft ClassicShell 4.3.1 V01 (vivosoft_classicshell_4.3.1_v01 Build 0.0.0.0)
|
||||
- Japan Fonts (v2.2)
|
||||
- Java 8 Update 101 (v8.0.1010.13)
|
||||
- MarkDNC 6.0.0 (v6.0.0)
|
||||
- MarkEdit (v3.00.01)
|
||||
- Microsoft Access Runtime 2010 (v14.0.7015.1000)
|
||||
- Microsoft Office 2007-2010 Compatibility Pack
|
||||
- Microsoft Office 2010 Viewers (vmicrosoft_office_2010_viewers_v5 Build 1.1.0.9)
|
||||
- Microsoft Office Access Runtime 2010 (v14.0.7015.1000)
|
||||
- Microsoft Office Access Runtime MUI (English) 2010 (v14.0.7015.1000)
|
||||
- Microsoft Office Excel Viewer (v12.0.6612.1000)
|
||||
- Microsoft Office Office 64-bit Components 2010 (v14.0.7015.1000)
|
||||
- Microsoft Office Shared 64-bit MUI (English) 2010 (v14.0.7015.1000)
|
||||
- Microsoft Office Shared 64-bit Setup Metadata MUI (English) 2010 (v14.0.7015.1000)
|
||||
- Microsoft Office Shared MUI (English) 2010 (v14.0.7015.1000)
|
||||
- Microsoft Office Shared Setup Metadata MUI (English) 2010 (v14.0.7015.1000)
|
||||
- Microsoft Office Word Viewer 2003 (v11.0.8173.0)
|
||||
- Microsoft PowerPoint Viewer (v14.0.7015.1000)
|
||||
- Microsoft Visual C++ 2005 Redistributable (v8.0.61001)
|
||||
- Microsoft Visual C++ 2010 x64 Redistributable - 10.0.40219 (v10.0.40219)
|
||||
- Microsoft Visual C++ 2010 x86 Redistributable - 10.0.40219 (v10.0.40219)
|
||||
- Microsoft Visual C++ 2015 Redistributable (x64) - 14.0.23506 (v14.0.23506.0)
|
||||
- Microsoft Visual C++ 2015 Redistributable (x86) - 14.0.23506 (v14.0.23506.0)
|
||||
- Microsoft Visual C++ 2015 Run-Time (v14.0.23509)
|
||||
- Microsoft Visual C++ 2015 x64 Additional Runtime - 14.0.23506 (v14.0.23506)
|
||||
- Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0.23506 (v14.0.23506)
|
||||
- Microsoft Visual C++ 2015 x86 Additional Runtime - 14.0.23506 (v14.0.23506)
|
||||
- Microsoft Visual C++ 2015 x86 Minimum Runtime - 14.0.23506 (v14.0.23506)
|
||||
- National Instruments Software
|
||||
- NI Atomic PXIe Peripheral Module Driver 16.0.0 (v16.00.49152)
|
||||
- NI Certificates 1.0.7 (v1.07.49153)
|
||||
- NI Controller Driver 16.0 (v16.00.49152)
|
||||
- NI Controller Driver 16.0 64-bit (v16.00.49152)
|
||||
- NI Curl 16.0.0 (64-bit) (v16.0.100)
|
||||
- NI Curl 2016 (v16.0.100)
|
||||
- NI Error Reporting Interface 16.0 (v16.0.203)
|
||||
- NI Error Reporting Interface 16.0 for Windows (64-bit) (v16.0.203)
|
||||
- NI Ethernet Device Enumerator (v1.01.49152)
|
||||
- NI Ethernet Device Enumerator 64-Bit (v1.01.49152)
|
||||
- NI EulaDepot (v16.0.30)
|
||||
- NI LabVIEW C Interface (v1.0.1)
|
||||
- NI MDF Support (v16.0.180)
|
||||
- NI mDNS Responder 16.0 for Windows 64-bit (v16.00.49152)
|
||||
- NI mDNS Responder 16.0.0 (v16.00.49152)
|
||||
- NI MXI Manager 16.0 (v16.00.49152)
|
||||
- NI MXI Manager 16.0 64-bit (v16.00.49152)
|
||||
- NI MXS 16.0.0 (v16.00.49152)
|
||||
- NI MXS 16.0.0 for 64 Bit Windows (v16.00.49152)
|
||||
- NI Physical Interface Extension Installer 15.0.0 (v15.00.49152)
|
||||
- NI Physical Interface Extension Installer for 64-bit 15.0.0 (v15.00.49152)
|
||||
- NI Portable Configuration 16.0.0 (v16.00.49152)
|
||||
- NI Portable Configuration for 64 Bit Windows 16.0.0 (v16.00.49152)
|
||||
- NI PXI Platform Framework 16.0.0 (v16.00.49152)
|
||||
- NI PXI Platform Framework 16.0.0 64-bit (v16.00.49152)
|
||||
- NI PXI Platform Services 16.0 Expert (v16.00.49152)
|
||||
- NI PXI Platform Services Runtime 16.0 (v16.00.49152)
|
||||
- NI PXI Platform Services Runtime 16.0 64-bit (v16.00.49152)
|
||||
- NI RTSI Cable Core Installer 15.5.0 (v15.50.49152)
|
||||
- NI RTSI Cable Core Installer for 64 Bit Windows 15.5.0 (v15.50.49152)
|
||||
- NI RTSI PAL Device Library Installer 15.5.0 (v15.50.49152)
|
||||
- NI RTSI PAL Device Library Installer for 64 Bit Windows 15.5.0 (v15.50.49152)
|
||||
- NI Security Update (KB 67L8LCQW) (v1.0.29.0)
|
||||
- NI Security Update (KB 67L8LCQW) (64-bit) (v1.0.29.0)
|
||||
- NI Service Locator 2016 (v16.0.150)
|
||||
- NI SSL Support (v16.0.181)
|
||||
- NI SSL Support (64-bit) (v16.0.181)
|
||||
- NI System API Windows 32-bit 16.0.0 (v16.0.183)
|
||||
- NI System API Windows 64-bit 16.0.0 (v16.0.183)
|
||||
- NI System Monitor 16.0 (v16.00.49152)
|
||||
- NI System Monitor 16.0 64-bit (v16.00.49152)
|
||||
- NI Uninstaller (v16.0.180)
|
||||
- NI VC2008MSMs x64 (v9.0.401)
|
||||
- NI VC2008MSMs x86 (v9.0.401)
|
||||
- NI Xerces Delay Load 2.7.7 (v2.7.237)
|
||||
- NI Xerces Delay Load 2.7.7 64-bit (v2.7.247)
|
||||
- NI-APAL 15.1 64-Bit Error Files (v15.10.49152)
|
||||
- NI-APAL 15.1 Error Files (v15.10.49152)
|
||||
- NI-DAQmx 16.0.1 (v16.01.49152)
|
||||
- NI-DAQmx 653x Installer 14.5.0 (v14.50.49152)
|
||||
- NI-DAQmx 653x Installer for 64 Bit Windows 14.5.0 (v14.50.49152)
|
||||
- NI-DAQmx Common Digital 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx Common Digital for 64 Bit Windows 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx Dynamic Signal Acquisition for 64 Bit Windows 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx Dynamic Signal Acquisition Installer 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx FSL Installer 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx FSL Installer for 64-Bit Windows 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx MIO Device Drivers 16.0.1 (v16.01.49153)
|
||||
- NI-DAQmx MIO Device Drivers for 64 Bit Windows 16.0.1 (v16.01.49153)
|
||||
- NI-DAQmx MX Expert Framework 16.0.0 (v16.00.49152)
|
||||
- NI-DAQmx MX Expert Framework for 64 Bit Windows 16.0.0 (v16.00.49152)
|
||||
- NI-DAQmx Remote Service 16.0.0 (v16.00.49152)
|
||||
- NI-DAQmx Remote Service 64-bit 16.0.0 64-bit (v16.00.49152)
|
||||
- NI-DAQmx SCXI 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx SCXI for 64 Bit Windows 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx STC 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx STC for 64 Bit Windows 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx Switch Core 15.1.0 (v15.10.49152)
|
||||
- NI-DAQmx Switch Core for 64 Bit Windows 15.1.0 (v15.10.49152)
|
||||
- NI-DAQmx Timing for 64 Bit Windows 15.5.0 (v15.50.49152)
|
||||
- NI-DAQmx Timing Installer 15.5.0 (v15.50.49152)
|
||||
- NI-DIM 16.0.0 (v16.00.49152)
|
||||
- NI-DIM 16.0.0 for 64-bit Windows (v16.00.49152)
|
||||
- NI-MDBG 16.0.0f0 (v16.00.49152)
|
||||
- NI-MDBG 16.0.0f0 for 64 Bit Windows (v16.00.49152)
|
||||
- NI-MRU 16.0.0 (v16.00.49152)
|
||||
- NI-MRU 16.0.0 for 64-bit Windows (v16.00.49152)
|
||||
- NI-MXDF 16.0.0f0 (v16.00.49152)
|
||||
- NI-MXDF 16.0.0f0 for 64 Bit Windows (v16.00.49152)
|
||||
- NI-MXLC Core (32-bit) (v16.0.34)
|
||||
- NI-MXLC Core (64-bit) (v16.0.34)
|
||||
- NI-ORB 16.0 (v16.00.49152)
|
||||
- NI-ORB 16.0 for 64-bit Windows (v16.00.49152)
|
||||
- NI-PAL 16.0 64-Bit Error Files (v16.00.49153)
|
||||
- NI-PAL 16.0 Error Files (v16.00.49153)
|
||||
- NI-PAL 16.0.0f1 (v16.00.49153)
|
||||
- NI-PAL 16.0.0f1 for 64 Bit Windows (v16.00.49153)
|
||||
- NI-PCI Bridge Driver 16.0 (v16.00.49152)
|
||||
- NI-PCI Bridge Driver 16.0 64-bit (v16.00.49152)
|
||||
- NI-PXIPF Error 15.0.5 (v15.05.49152)
|
||||
- NI-PXIPF Error 15.0.5 for 64-bit Windows (v15.05.49152)
|
||||
- NI-QPXI 16.0.0 (v16.00.49152)
|
||||
- NI-QPXI 16.0.0 for 64-bit Windows (v16.00.49152)
|
||||
- NI-RIO USBLAN 16.0 (v16.00.49152)
|
||||
- NI-RIO USBLAN 16.0 (64-bit) (v16.00.49152)
|
||||
- NI-RoCo Error Files 16.0.0 (v16.00.49152)
|
||||
- NI-ROCO Error Files 16.0.0 for 64-bit Windows (v16.00.49152)
|
||||
- NI-RPC 16.0.0f0 (v16.00.49152)
|
||||
- NI-RPC 16.0.0f0 for 64 Bit Windows (v16.00.49152)
|
||||
- NI-RPC 16.0.0f0 for Phar Lap ETS (v16.00.49152)
|
||||
- NI-Xlator 16.0.0f0 (v16.00.49152)
|
||||
- NI-Xlator 16.0.0f0 for 64 Bit Windows (v16.00.49152)
|
||||
- NOMS (v1.0.0)
|
||||
- OpenText Host Explorer - ShopFloor 15 SP1 V01 (vopentext_hostexplorer-shopfloor_15sp1_v01 Build 0.0.0.0)
|
||||
- OpenText HostExplorer 15 x64 (v15.0.1)
|
||||
- OpenText HostExplorer SP1 15.0 V01 (vopentext_hostexplorer_sp1_15.0_v01 Build 0.0.0.0)
|
||||
- Oracle JavaRuntimeEnvironment 8u101 V01 (voracle_javaruntimeenvironment_8u101_v01 Build 0.0.0.0)
|
||||
- Oracle OracleDatabase 11r2 V03 (voracle_oracledatabase_11r2_v03 Build 0.0.0.0)
|
||||
- PCIe to Peripheral Adaptor | ||||