Files
powershell-scripts/asset-collection/README.md
cproudlock 62c0c7bb06 Initial commit: Organized PowerShell scripts for ShopDB asset collection
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>
2025-12-10 10:57:54 -05:00

126 lines
3.5 KiB
Markdown

# Asset Collection Scripts
Scripts for collecting PC asset data and sending it to the ShopDB database.
## Scripts
### Update-PC-CompleteAsset.ps1
**Primary asset collection script** - Comprehensive data collection for all PC types.
**What it collects:**
- System information (hostname, serial number, manufacturer, model)
- Operating system details
- Network interface configurations
- For shopfloor PCs: DNC/machine configurations from GE registry
- Dell warranty information (optional, via proxy)
**Usage:**
```powershell
# Standard execution (requires administrator)
.\Update-PC-CompleteAsset.ps1
# Test connectivity only
.\Update-PC-CompleteAsset.ps1 -TestConnections
# With warranty lookup enabled
.\Update-PC-CompleteAsset.ps1 -SkipWarranty:$false
```
**Parameters:**
| Parameter | Default | Description |
|-----------|---------|-------------|
| `-ProxyURL` | `http://10.48.130.158/vendor-api-proxy.php` | Warranty API proxy |
| `-DashboardURL` | `https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp` | ShopDB API endpoint |
| `-SkipWarranty` | `$true` | Skip warranty lookups |
| `-TestConnections` | `$false` | Test API connectivity only |
---
### Get-ShopfloorConfig.ps1
**Shopfloor configuration library** - Functions for collecting manufacturing-specific data.
**Functions provided:**
- `Get-NetworkInterfaceConfig` - Collects all network adapter information
- `Get-SerialPortConfig` - Enumerates COM port configurations
- `Get-DNCConfig` - Extracts DNC registry settings
- `Get-GERegistryConfig` - Reads GE Aircraft Engines registry keys
**Note:** This script is sourced by `Update-PC-CompleteAsset.ps1` and not run directly.
---
### Update-PC-Minimal.ps1
**Lightweight collection script** - For locked-down PCs with restricted permissions.
**What it collects:**
- Basic system info without requiring admin privileges
- Uses only non-elevated WMI/CIM queries
- Detects PC-DMIS software for measuring machine classification
**Usage:**
```powershell
.\Update-PC-Minimal.ps1
```
**When to use:**
- PCs where users cannot run as administrator
- Measuring machines with restricted permissions
- Quick data collection without full registry access
---
### Get-InstalledApps.ps1
**Application inventory script** - Collects list of installed applications.
**Usage:**
```powershell
.\Get-InstalledApps.ps1
```
---
## Batch File Launchers
| File | Purpose |
|------|---------|
| `Update-PC-CompleteAsset.bat` | Standard launcher with visible window |
| `Update-PC-CompleteAsset-Silent.bat` | Silent launcher for scheduled tasks |
| `Update-PC-Minimal.bat` | Launcher for minimal collection |
| `Get-InstalledApps.bat` | Launcher for app inventory |
| `Run-GetInstalledApps.bat` | Alternative app inventory launcher |
---
## Requirements
- PowerShell 5.1 or later
- Administrator privileges (for full collection)
- Network access to ShopDB API
- Windows 10/11 or Windows Server
## Data Flow
```
PC Local Execution
┌──────────────────┐
│ Update-PC- │
│ CompleteAsset.ps1│
│ + │
│ Get-Shopfloor- │
│ Config.ps1 │
└────────┬─────────┘
│ HTTPS POST
┌──────────────────┐
│ ShopDB API │
│ (api.asp) │
└────────┬─────────┘
┌──────────────────┐
│ MySQL Database │
└──────────────────┘
```