Structure: - asset-collection/: Local PC data collection scripts - remote-execution/: WinRM remote execution scripts - setup-utilities/: Configuration and testing utilities - registry-backup/: GE registry backup scripts - winrm-https/: WinRM HTTPS certificate setup - docs/: Complete documentation Each folder includes a README with detailed documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
280 lines
12 KiB
Markdown
280 lines
12 KiB
Markdown
# GE Manufacturing Asset Management Scripts
|
|
|
|
PowerShell scripts for comprehensive asset data collection in GE manufacturing environments.
|
|
|
|
## Overview
|
|
|
|
This repository contains PowerShell scripts designed to collect detailed system information from manufacturing PCs, including:
|
|
|
|
- **System Information**: Hardware, OS, users, warranty data
|
|
- **Network Configuration**: Interfaces, IPs, machine network detection
|
|
- **Manufacturing Integration**: DNC configuration, serial communication
|
|
- **GE Registry Analysis**: DualPath settings, architecture detection
|
|
- **Asset Classification**: Engineer/Shopfloor/Standard PC types
|
|
|
|
## Key Features
|
|
|
|
### 🏭 Manufacturing-Specific Data Collection
|
|
- **DNC Configuration**: Extracts GE Aircraft Engines registry settings
|
|
- **DualPath Detection**: Identifies Path1Name/Path2Name for dual communication paths
|
|
- **Registry Architecture Analysis**: Tracks 32-bit vs 64-bit service locations per DNC service
|
|
- **Machine Network Detection**: Automatically identifies 192.168.*.* networks
|
|
- **GE Machine Number Extraction**: Derives machine numbers from hostname patterns
|
|
|
|
### 📊 Comprehensive System Analysis
|
|
- Hardware specifications (manufacturer, model, serial, memory)
|
|
- Operating system details and user information
|
|
- Network interface configurations with DHCP detection
|
|
- Serial port configurations for machine communication
|
|
- PC type classification based on environment characteristics
|
|
|
|
### 🔧 Local Deployment
|
|
- Dashboard API integration for centralized data storage
|
|
- Individual PC execution and data collection
|
|
- Error handling and graceful degradation
|
|
- Detailed logging with color-coded status messages
|
|
|
|
## Main Scripts
|
|
|
|
### `Update-PC-CompleteAsset.ps1`
|
|
Primary PowerShell script for comprehensive asset data collection and database storage using hybrid proxy/dashboard architecture.
|
|
|
|
**Usage:**
|
|
```powershell
|
|
.\Update-PC-CompleteAsset.ps1 [-ProxyURL "http://proxy/api.php"] [-DashboardURL "http://server/api.php"] [-SkipWarranty] [-TestConnections]
|
|
```
|
|
|
|
**Parameters:**
|
|
- `-ProxyURL`: Warranty API proxy server (default: http://10.48.130.158/vendor-api-proxy.php)
|
|
- `-DashboardURL`: Dashboard API endpoint (default: auto-discovery)
|
|
- `-SkipWarranty`: Skip warranty lookups (default: true)
|
|
- `-TestConnections`: Test proxy and dashboard connectivity
|
|
|
|
**Data Collected:**
|
|
- System specifications and identification
|
|
- Network and communication configurations
|
|
- Manufacturing-specific registry settings
|
|
- Dell warranty information via proxy server (when enabled)
|
|
|
|
### `Get-ShopfloorConfig.ps1`
|
|
Specialized functions for manufacturing environment data collection.
|
|
|
|
**Features:**
|
|
- Network interface enumeration with machine network detection
|
|
- Serial port configuration analysis
|
|
- DNC registry configuration extraction
|
|
- GE Aircraft Engines registry architecture analysis
|
|
|
|
## Deployment Options
|
|
|
|
### `Update-PC-CompleteAsset.bat`
|
|
Standard batch file for running asset collection on individual PCs.
|
|
|
|
### `Update-PC-CompleteAsset-Silent.bat`
|
|
Silent execution version for scheduled tasks or automated deployment.
|
|
|
|
## Configuration
|
|
|
|
### Dashboard Integration
|
|
Scripts use a hybrid proxy/dashboard architecture:
|
|
- **Proxy Server**: Handles warranty API calls (default: http://10.48.130.158/vendor-api-proxy.php)
|
|
- **Dashboard API**: Stores collected data (auto-discovery from multiple candidates)
|
|
- **Auto-discovery**: Tests multiple dashboard endpoints automatically
|
|
- **Configuration**: Supports environment variables and config files
|
|
|
|
## Data Storage
|
|
|
|
All collected data is transmitted to a centralized dashboard API for storage in MySQL database:
|
|
- **PC Table**: Basic system information and specifications
|
|
- **PC_DNC_Config Table**: Manufacturing configurations and registry architecture
|
|
- **Network Interfaces**: Detailed network configuration data
|
|
- **Communication Configs**: Serial port and manufacturing communication settings
|
|
- **Machines Table**: Auto-populated from shopfloor PC machine numbers
|
|
|
|
## Architecture
|
|
|
|
```
|
|
PowerShell Scripts → Proxy Server (warranty APIs) → Dashboard API → MySQL Database
|
|
↘ ↗
|
|
Dashboard API (direct storage)
|
|
```
|
|
|
|
**Components:**
|
|
- **PowerShell Scripts**: Run locally on each PC
|
|
- **Proxy Server**: Bypasses network restrictions for warranty API calls
|
|
- **Dashboard API**: Centralized data storage and management
|
|
|
|
## Security Considerations
|
|
|
|
- Scripts require PowerShell execution policy bypass (handled automatically)
|
|
- Network access required for proxy and dashboard API communication
|
|
- Registry access needed for manufacturing configuration detection
|
|
- Administrative privileges required for complete data collection
|
|
- Warranty lookups disabled by default (SkipWarranty=true)
|
|
|
|
## Manufacturing Environment Features
|
|
|
|
### PC Type Classification
|
|
- **Engineer**: Systems with Apps folder and V-drive access
|
|
- **Shopfloor**: Windows LTSC systems for manufacturing floor
|
|
- **Standard**: General-purpose corporate systems
|
|
|
|
### GE-Specific Integration
|
|
- Machine number extraction from hostname patterns (H###, G###)
|
|
- DNC configuration analysis for CNC machine communication
|
|
- DualPath communication path detection
|
|
- Registry architecture tracking for service-specific configurations
|
|
- Automated machine table population from collected PC data
|
|
|
|
## New in v3.2: Machine Auto-Population
|
|
|
|
### Automated Machine Discovery
|
|
- **Machine Table Auto-Population**: Automatically creates machine records from shopfloor PC data
|
|
- **Duplicate Handling**: Properly manages multiple PCs per machine (Control, HMI, Engineering, Backup)
|
|
- **PC-Machine Relationships**: Junction table tracking for comprehensive PC-to-machine mapping
|
|
- **Smart Role Detection**: Identifies PC roles from hostname patterns (HMI, Control, Engineering)
|
|
- **IP Address Assignment**: Uses most recent PC data for primary machine IP addresses
|
|
- **Comprehensive Coverage**: Handles numeric (3103, 7402), M-prefix (M439), and special equipment (WJPRT)
|
|
|
|
### Production Deployment
|
|
- **121 Machines Auto-Discovered**: Complete shopfloor machine inventory from PC data
|
|
- **100% Success Rate**: All machine numbers successfully processed and stored
|
|
- **Relationship Tracking**: Full PC-to-machine relationship mapping with role identification
|
|
- **Edge Case Handling**: Robust processing of all machine number formats and types
|
|
|
|
## New in v3.0: Enhanced Registry Analysis
|
|
|
|
### GE Aircraft Engines Registry Detection
|
|
- **Dual Registry Support**: Scans both 32-bit and 64-bit registry locations
|
|
- **Per-Service Architecture**: Tracks which registry each DNC service uses
|
|
- **Smart Priority System**: Prevents data overwrites when both locations exist
|
|
- **Comprehensive DualPath Analysis**: Complete eFocas configuration extraction
|
|
|
|
### Registry Locations Scanned:
|
|
```
|
|
HKLM:\SOFTWARE\GE Aircraft Engines (32-bit)
|
|
HKLM:\SOFTWARE\WOW6432Node\GE Aircraft Engines (64-bit)
|
|
```
|
|
|
|
### DNC Services Analyzed:
|
|
- EFOCAS, SERIAL, NTSHR, HSSB, PPDCS
|
|
- TncRemo, Plant3, HeatTreat, PaintBooth
|
|
- And more...
|
|
|
|
## Version History
|
|
|
|
- **v3.0**: Added GE registry architecture analysis and DualPath detection
|
|
- **v2.1**: Enhanced shopfloor configuration collection
|
|
- **v2.0**: Integrated manufacturing-specific data collection
|
|
- **v1.0**: Basic system information collection and dashboard integration
|
|
|
|
## Requirements
|
|
|
|
- PowerShell 5.1 or later
|
|
- Network access to dashboard API
|
|
- Windows systems (tested on Windows 10/11, Windows Server)
|
|
- Administrative privileges recommended
|
|
|
|
## Quick Start
|
|
|
|
1. **Run Asset Collection**
|
|
```batch
|
|
Update-PC-CompleteAsset.bat
|
|
```
|
|
Must run as administrator!
|
|
|
|
2. **Silent Execution**
|
|
```batch
|
|
Update-PC-CompleteAsset-Silent.bat
|
|
```
|
|
For scheduled tasks or automated deployment
|
|
|
|
## Deployment Options
|
|
|
|
### Individual PC Execution
|
|
Run `Update-PC-CompleteAsset.bat` directly on each target PC
|
|
|
|
### Scheduled Task Deployment
|
|
Use `Update-PC-CompleteAsset-Silent.bat` with Windows Task Scheduler for automated data collection
|
|
|
|
### Enterprise Deployment
|
|
Deploy via Group Policy, SCCM, or Tanium for organization-wide asset collection
|
|
|
|
## Folder Structure
|
|
|
|
```
|
|
powershell-scripts/
|
|
├── asset-collection/ # Local PC data collection scripts
|
|
│ ├── Update-PC-CompleteAsset.ps1 # Primary collection script
|
|
│ ├── Get-ShopfloorConfig.ps1 # Shopfloor config functions
|
|
│ ├── Update-PC-Minimal.ps1 # Lightweight collection
|
|
│ └── Get-InstalledApps.ps1 # Application inventory
|
|
│
|
|
├── remote-execution/ # Remote WinRM execution scripts
|
|
│ ├── Invoke-RemoteAssetCollection.ps1 # WinRM HTTP
|
|
│ ├── Invoke-RemoteAssetCollection-HTTPS.ps1 # WinRM HTTPS
|
|
│ └── Update-ShopfloorPCs-Remote.ps1 # Batch update from ShopDB
|
|
│
|
|
├── setup-utilities/ # Configuration and testing
|
|
│ ├── Setup-WinRM.ps1 # WinRM configuration
|
|
│ ├── Install-AssetCollectionSchedule.ps1 # Scheduled task setup
|
|
│ └── Test-API-Connection.ps1 # API connectivity test
|
|
│
|
|
├── registry-backup/ # GE registry backup
|
|
│ └── Backup-GERegistry.ps1 # Registry export utility
|
|
│
|
|
├── winrm-https/ # WinRM HTTPS/certificate setup
|
|
│ ├── Setup-WinRM-HTTPS.ps1 # HTTPS configuration
|
|
│ ├── Create-CertificateAuthority.ps1 # CA creation
|
|
│ └── ... (certificate management scripts)
|
|
│
|
|
└── docs/ # Documentation
|
|
└── SCRIPTS_REFERENCE.md # Complete script reference
|
|
```
|
|
|
|
## Documentation
|
|
|
|
| Document | Description |
|
|
|----------|-------------|
|
|
| **[docs/SCRIPTS_REFERENCE.md](docs/SCRIPTS_REFERENCE.md)** | Complete reference for all scripts |
|
|
| **[asset-collection/README.md](asset-collection/README.md)** | Asset collection scripts |
|
|
| **[remote-execution/README.md](remote-execution/README.md)** | Remote execution scripts |
|
|
| **[setup-utilities/README.md](setup-utilities/README.md)** | Setup and utility scripts |
|
|
| **[registry-backup/README.md](registry-backup/README.md)** | Registry backup scripts |
|
|
| **[winrm-https/README.md](winrm-https/README.md)** | WinRM HTTPS setup guide |
|
|
|
|
## All Scripts Summary
|
|
|
|
| Folder | Script | Purpose |
|
|
|--------|--------|---------|
|
|
| `asset-collection/` | `Update-PC-CompleteAsset.ps1` | Primary asset collection |
|
|
| `asset-collection/` | `Get-ShopfloorConfig.ps1` | Shopfloor configuration functions |
|
|
| `asset-collection/` | `Update-PC-Minimal.ps1` | Lightweight collection for restricted PCs |
|
|
| `asset-collection/` | `Get-InstalledApps.ps1` | Application inventory |
|
|
| `remote-execution/` | `Invoke-RemoteAssetCollection.ps1` | Remote collection via WinRM HTTP |
|
|
| `remote-execution/` | `Invoke-RemoteAssetCollection-HTTPS.ps1` | Remote collection via WinRM HTTPS |
|
|
| `remote-execution/` | `Update-ShopfloorPCs-Remote.ps1` | Update all shopfloor PCs from ShopDB |
|
|
| `setup-utilities/` | `Setup-WinRM.ps1` | WinRM configuration utility |
|
|
| `setup-utilities/` | `Install-AssetCollectionSchedule.ps1` | Scheduled task installer |
|
|
| `setup-utilities/` | `Test-API-Connection.ps1` | API connectivity tester |
|
|
| `registry-backup/` | `Backup-GERegistry.ps1` | GE registry backup utility |
|
|
|
|
See each folder's README for detailed documentation.
|
|
|
|
## Support
|
|
|
|
For issues or questions:
|
|
1. Check script execution logs for detailed error information
|
|
2. Verify PowerShell execution policy settings
|
|
3. Confirm network connectivity to dashboard API
|
|
4. Review system requirements and permissions
|
|
|
|
## Repository
|
|
|
|
- **Gitea:** http://localhost:3000/cproudlock/powershell-scripts
|
|
- **Clone:** `git clone ssh://git@localhost:2222/cproudlock/powershell-scripts.git`
|
|
|
|
---
|
|
|
|
**Designed for GE Manufacturing Environments**
|
|
*Comprehensive asset management with manufacturing intelligence* |