diff --git a/README.md b/README.md index a63df07..08a5d38 100644 --- a/README.md +++ b/README.md @@ -204,32 +204,36 @@ Deploy via Group Policy, SCCM, or Tanium for organization-wide asset collection ``` 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 +├── complete-asset/ # Full asset collection (requires admin) +│ ├── Update-PC-CompleteAsset.bat # Main launcher +│ ├── Update-PC-CompleteAsset-Silent.bat # Silent launcher +│ ├── Update-PC-CompleteAsset.ps1 # Main script +│ └── Get-ShopfloorConfig.ps1 # Shopfloor config functions +│ +├── minimal-asset/ # Lightweight collection (no admin required) +│ ├── Update-PC-Minimal.bat # Main launcher +│ └── Update-PC-Minimal.ps1 # Main script │ ├── remote-execution/ # Remote WinRM execution scripts -│ ├── Invoke-RemoteAssetCollection.ps1 # WinRM HTTP +│ ├── Run-RemoteCollection.bat # Main launcher +│ ├── Invoke-RemoteAssetCollection.ps1 # WinRM HTTP │ ├── Invoke-RemoteAssetCollection-HTTPS.ps1 # WinRM HTTPS -│ └── Update-ShopfloorPCs-Remote.ps1 # Batch update from ShopDB +│ └── 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 +│ ├── Test-API-Connection.ps1 # API connectivity test +│ └── Get-InstalledApps.ps1 # Application inventory │ ├── registry-backup/ # GE registry backup +│ ├── Backup-GERegistry.bat # Main launcher │ └── 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) +│ └── (certificate management scripts) │ └── docs/ # Documentation - └── SCRIPTS_REFERENCE.md # Complete script reference ``` ## Documentation @@ -237,7 +241,8 @@ powershell-scripts/ | 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 | +| **[complete-asset/README.md](complete-asset/README.md)** | Full asset collection (admin required) | +| **[minimal-asset/README.md](minimal-asset/README.md)** | Lightweight collection (no admin) | | **[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 | @@ -245,19 +250,13 @@ powershell-scripts/ ## 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 | +| Folder | Entry Point | Purpose | +|--------|-------------|---------| +| `complete-asset/` | `Update-PC-CompleteAsset.bat` | Full asset collection (admin required) | +| `minimal-asset/` | `Update-PC-Minimal.bat` | Lightweight collection (no admin) | +| `remote-execution/` | `Run-RemoteCollection.bat` | Remote collection via WinRM | +| `setup-utilities/` | `Install-Schedule.bat` | Scheduled task installer | +| `registry-backup/` | `Backup-GERegistry.bat` | GE registry backup | See each folder's README for detailed documentation. diff --git a/asset-collection/README.md b/asset-collection/README.md deleted file mode 100644 index d5e4b31..0000000 --- a/asset-collection/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# Asset Collection Scripts - -Scripts for collecting PC asset data and sending it to the ShopDB database. - -## Quick Start - -**Run as Administrator:** -```batch -Update-PC-CompleteAsset.bat -``` - -For scheduled tasks (no window): -```batch -Update-PC-CompleteAsset-Silent.bat -``` - ---- - -## Batch Launchers (Entry Points) - -| Batch File | Purpose | -|------------|---------| -| `Update-PC-CompleteAsset.bat` | Main launcher - run this for full asset collection | -| `Update-PC-CompleteAsset-Silent.bat` | Silent version for scheduled tasks | -| `Update-PC-Minimal.bat` | Lightweight collection for restricted PCs | -| `Get-InstalledApps.bat` | Application inventory only | - ---- - -## PowerShell 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 │ -└──────────────────┘ -``` diff --git a/asset-collection/Get-ShopfloorConfig.ps1 b/complete-asset/Get-ShopfloorConfig.ps1 similarity index 100% rename from asset-collection/Get-ShopfloorConfig.ps1 rename to complete-asset/Get-ShopfloorConfig.ps1 diff --git a/complete-asset/README.md b/complete-asset/README.md new file mode 100644 index 0000000..b060bdb --- /dev/null +++ b/complete-asset/README.md @@ -0,0 +1,74 @@ +# Complete Asset Collection + +Comprehensive PC asset data collection scripts. **Requires Administrator privileges.** + +## Quick Start + +**Run as Administrator:** +```batch +Update-PC-CompleteAsset.bat +``` + +For scheduled tasks (no window): +```batch +Update-PC-CompleteAsset-Silent.bat +``` + +--- + +## Files + +| File | Description | +|------|-------------| +| `Update-PC-CompleteAsset.bat` | Main launcher (interactive) | +| `Update-PC-CompleteAsset-Silent.bat` | Silent launcher for scheduled tasks | +| `Update-PC-CompleteAsset.ps1` | Main PowerShell script | +| `Get-ShopfloorConfig.ps1` | Shopfloor configuration functions (required) | + +--- + +## Requirements + +- **Administrator privileges required** +- PowerShell 5.1 or later +- Network access to ShopDB API + +--- + +## What It Collects + +- System information (hostname, serial number, manufacturer, model) +- Operating system details +- Network interface configurations (all adapters) +- For shopfloor PCs: + - DNC/machine configurations from GE registry + - Machine network detection (192.168.x.x) + - Serial port configurations + - DualPath settings +- Dell warranty information (optional, via proxy) + +--- + +## 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 | + +--- + +## Usage Examples + +```powershell +# Standard execution +.\Update-PC-CompleteAsset.ps1 + +# Test connectivity only +.\Update-PC-CompleteAsset.ps1 -TestConnections + +# With warranty lookup enabled +.\Update-PC-CompleteAsset.ps1 -SkipWarranty:$false +``` diff --git a/asset-collection/Update-PC-CompleteAsset-Silent.bat b/complete-asset/Update-PC-CompleteAsset-Silent.bat similarity index 100% rename from asset-collection/Update-PC-CompleteAsset-Silent.bat rename to complete-asset/Update-PC-CompleteAsset-Silent.bat diff --git a/asset-collection/Update-PC-CompleteAsset.bat b/complete-asset/Update-PC-CompleteAsset.bat similarity index 100% rename from asset-collection/Update-PC-CompleteAsset.bat rename to complete-asset/Update-PC-CompleteAsset.bat diff --git a/asset-collection/Update-PC-CompleteAsset.ps1 b/complete-asset/Update-PC-CompleteAsset.ps1 similarity index 100% rename from asset-collection/Update-PC-CompleteAsset.ps1 rename to complete-asset/Update-PC-CompleteAsset.ps1 diff --git a/minimal-asset/README.md b/minimal-asset/README.md new file mode 100644 index 0000000..108f147 --- /dev/null +++ b/minimal-asset/README.md @@ -0,0 +1,56 @@ +# Minimal Asset Collection + +Lightweight PC asset data collection. **No Administrator privileges required.** + +## Quick Start + +```batch +Update-PC-Minimal.bat +``` + +--- + +## Files + +| File | Description | +|------|-------------| +| `Update-PC-Minimal.bat` | Main launcher | +| `Update-PC-Minimal.ps1` | Main PowerShell script | + +--- + +## Requirements + +- **No administrator privileges needed** +- PowerShell 5.1 or later +- Network access to ShopDB API + +--- + +## What It Collects + +- Basic system info (hostname, serial number, manufacturer, model) +- IP address (using ipconfig, no elevated permissions) +- PC-DMIS software detection (for measuring machine classification) + +--- + +## When to Use + +- PCs where users cannot run as administrator +- Measuring machines with restricted permissions +- Quick data collection without full registry access +- Locked-down environments + +--- + +## Comparison with Complete Asset + +| Feature | Complete | Minimal | +|---------|----------|---------| +| Admin Required | Yes | No | +| Basic System Info | Yes | Yes | +| Network Interfaces | All | Primary only | +| GE Registry/DNC | Yes | No | +| Serial Ports | Yes | No | +| Warranty Lookup | Optional | No | diff --git a/asset-collection/Update-PC-Minimal.bat b/minimal-asset/Update-PC-Minimal.bat similarity index 100% rename from asset-collection/Update-PC-Minimal.bat rename to minimal-asset/Update-PC-Minimal.bat diff --git a/asset-collection/Update-PC-Minimal.ps1 b/minimal-asset/Update-PC-Minimal.ps1 similarity index 100% rename from asset-collection/Update-PC-Minimal.ps1 rename to minimal-asset/Update-PC-Minimal.ps1 diff --git a/asset-collection/Get-InstalledApps.bat b/setup-utilities/Get-InstalledApps.bat similarity index 100% rename from asset-collection/Get-InstalledApps.bat rename to setup-utilities/Get-InstalledApps.bat diff --git a/asset-collection/Get-InstalledApps.ps1 b/setup-utilities/Get-InstalledApps.ps1 similarity index 100% rename from asset-collection/Get-InstalledApps.ps1 rename to setup-utilities/Get-InstalledApps.ps1 diff --git a/asset-collection/Run-GetInstalledApps.bat b/setup-utilities/Run-GetInstalledApps.bat similarity index 100% rename from asset-collection/Run-GetInstalledApps.bat rename to setup-utilities/Run-GetInstalledApps.bat