Remove all emojis from markdown documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ The original deployment scripts contained Unicode box-drawing characters that ca
|
|||||||
|
|
||||||
## Clean Scripts Available
|
## Clean Scripts Available
|
||||||
|
|
||||||
### 1. Deploy-Simple.bat ✅ **RECOMMENDED**
|
### 1. Deploy-Simple.bat **RECOMMENDED**
|
||||||
- **Clean ASCII only** - No Unicode characters
|
- **Clean ASCII only** - No Unicode characters
|
||||||
- **Minimal output** - Easy to read
|
- **Minimal output** - Easy to read
|
||||||
- **Essential functionality** - Just copies files efficiently
|
- **Essential functionality** - Just copies files efficiently
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ mysql -u your_user -p shopdb < dualpath_migration.sql
|
|||||||
|
|
||||||
### /home/camp/asset_data/fin/Update-PC-CompleteAsset.ps1
|
### /home/camp/asset_data/fin/Update-PC-CompleteAsset.ps1
|
||||||
**Changes:**
|
**Changes:**
|
||||||
- Fixed Unicode arrow character (→ to ->)
|
- Fixed Unicode arrow character ( to ->)
|
||||||
- Integrated application detection for shopfloor PCs
|
- Integrated application detection for shopfloor PCs
|
||||||
|
|
||||||
### /home/camp/asset_data/fin/Get-ShopfloorConfig.ps1
|
### /home/camp/asset_data/fin/Get-ShopfloorConfig.ps1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# PowerShell Scripts - Production URL Configuration
|
# PowerShell Scripts - Production URL Configuration
|
||||||
|
|
||||||
**Date:** 2025-11-21
|
**Date:** 2025-11-21
|
||||||
**Status:** ✅ Updated for Production
|
**Status:** Updated for Production
|
||||||
**Target Server:** https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
**Target Server:** https://tsgwp00525.rd.ds.ge.com/shopdb/api.asp
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -57,11 +57,11 @@ xcopy /Y /E "\\fileserver\shares\IT\PowerShell\*.*" "C:\Apps\PowerShell\"
|
|||||||
**GPO Path:**
|
**GPO Path:**
|
||||||
```
|
```
|
||||||
Computer Configuration
|
Computer Configuration
|
||||||
→ Policies
|
Policies
|
||||||
→ Windows Settings
|
Windows Settings
|
||||||
→ Scripts (Startup/Shutdown)
|
Scripts (Startup/Shutdown)
|
||||||
→ Startup
|
Startup
|
||||||
→ Add: deploy-powershell-scripts.bat
|
Add: deploy-powershell-scripts.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Option B: Manual Copy via Network Share
|
#### Option B: Manual Copy via Network Share
|
||||||
@@ -107,10 +107,10 @@ Run with highest privileges: Yes
|
|||||||
**GPO Scheduled Task:**
|
**GPO Scheduled Task:**
|
||||||
```
|
```
|
||||||
Computer Configuration
|
Computer Configuration
|
||||||
→ Preferences
|
Preferences
|
||||||
→ Control Panel Settings
|
Control Panel Settings
|
||||||
→ Scheduled Tasks
|
Scheduled Tasks
|
||||||
→ New → Scheduled Task (Windows 7+)
|
New Scheduled Task (Windows 7+)
|
||||||
```
|
```
|
||||||
|
|
||||||
**Settings:**
|
**Settings:**
|
||||||
@@ -389,11 +389,11 @@ Remove-Item "S:\dt\cameron\scan\logs\test.txt"
|
|||||||
|
|
||||||
## Production Readiness Status
|
## Production Readiness Status
|
||||||
|
|
||||||
✅ **Scripts Updated:** Both .bat and .ps1 files configured for production URL
|
**Scripts Updated:** Both .bat and .ps1 files configured for production URL
|
||||||
✅ **Documentation:** Complete deployment guide created
|
**Documentation:** Complete deployment guide created
|
||||||
✅ **Testing Plan:** 3-tier testing (Standard, Shopfloor, Engineer)
|
**Testing Plan:** 3-tier testing (Standard, Shopfloor, Engineer)
|
||||||
✅ **Monitoring:** API logs and PowerShell logs configured
|
**Monitoring:** API logs and PowerShell logs configured
|
||||||
✅ **Rollback Plan:** DEV URL reversion documented
|
**Rollback Plan:** DEV URL reversion documented
|
||||||
|
|
||||||
**Ready for Deployment:** YES
|
**Ready for Deployment:** YES
|
||||||
|
|
||||||
|
|||||||
@@ -14,21 +14,21 @@ This repository contains PowerShell scripts designed to collect detailed system
|
|||||||
|
|
||||||
## Key Features
|
## Key Features
|
||||||
|
|
||||||
### 🏭 Manufacturing-Specific Data Collection
|
### Manufacturing-Specific Data Collection
|
||||||
- **DNC Configuration**: Extracts GE Aircraft Engines registry settings
|
- **DNC Configuration**: Extracts GE Aircraft Engines registry settings
|
||||||
- **DualPath Detection**: Identifies Path1Name/Path2Name for dual communication paths
|
- **DualPath Detection**: Identifies Path1Name/Path2Name for dual communication paths
|
||||||
- **Registry Architecture Analysis**: Tracks 32-bit vs 64-bit service locations per DNC service
|
- **Registry Architecture Analysis**: Tracks 32-bit vs 64-bit service locations per DNC service
|
||||||
- **Machine Network Detection**: Automatically identifies 192.168.*.* networks
|
- **Machine Network Detection**: Automatically identifies 192.168.*.* networks
|
||||||
- **GE Machine Number Extraction**: Derives machine numbers from hostname patterns
|
- **GE Machine Number Extraction**: Derives machine numbers from hostname patterns
|
||||||
|
|
||||||
### 📊 Comprehensive System Analysis
|
### Comprehensive System Analysis
|
||||||
- Hardware specifications (manufacturer, model, serial, memory)
|
- Hardware specifications (manufacturer, model, serial, memory)
|
||||||
- Operating system details and user information
|
- Operating system details and user information
|
||||||
- Network interface configurations with DHCP detection
|
- Network interface configurations with DHCP detection
|
||||||
- Serial port configurations for machine communication
|
- Serial port configurations for machine communication
|
||||||
- PC type classification based on environment characteristics
|
- PC type classification based on environment characteristics
|
||||||
|
|
||||||
### 🔧 Local Deployment
|
### Local Deployment
|
||||||
- Dashboard API integration for centralized data storage
|
- Dashboard API integration for centralized data storage
|
||||||
- Individual PC execution and data collection
|
- Individual PC execution and data collection
|
||||||
- Error handling and graceful degradation
|
- Error handling and graceful degradation
|
||||||
@@ -94,7 +94,7 @@ All collected data is transmitted to a centralized dashboard API for storage in
|
|||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
```
|
```
|
||||||
PowerShell Scripts → Proxy Server (warranty APIs) → Dashboard API → MySQL Database
|
PowerShell Scripts Proxy Server (warranty APIs) Dashboard API MySQL Database
|
||||||
↘ ↗
|
↘ ↗
|
||||||
Dashboard API (direct storage)
|
Dashboard API (direct storage)
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ $postData.dncConfig = {
|
|||||||
} | ConvertTo-Json -Compress
|
} | ConvertTo-Json -Compress
|
||||||
```
|
```
|
||||||
|
|
||||||
#### GE Registry Architecture Data ⭐ **New in v3.0**
|
#### GE Registry Architecture Data **New in v3.0**
|
||||||
```powershell
|
```powershell
|
||||||
# DualPath Communication Settings
|
# DualPath Communication Settings
|
||||||
$postData.dncDualPathEnabled = $true # Boolean: DualPath enabled
|
$postData.dncDualPathEnabled = $true # Boolean: DualPath enabled
|
||||||
@@ -204,7 +204,7 @@ UPDATE pc SET
|
|||||||
WHERE pcid = ?
|
WHERE pcid = ?
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `pc_dnc_config` Table (Manufacturing Configuration) ⭐ **Enhanced in v3.0**
|
#### `pc_dnc_config` Table (Manufacturing Configuration) **Enhanced in v3.0**
|
||||||
```sql
|
```sql
|
||||||
INSERT INTO pc_dnc_config (
|
INSERT INTO pc_dnc_config (
|
||||||
pcid, site, cnc, ncif, machinenumber, hosttype,
|
pcid, site, cnc, ncif, machinenumber, hosttype,
|
||||||
@@ -217,7 +217,7 @@ INSERT INTO pc_dnc_config (
|
|||||||
ON DUPLICATE KEY UPDATE ...
|
ON DUPLICATE KEY UPDATE ...
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `machines` Table (Auto-Population) ⭐ **New in v3.2**
|
#### `machines` Table (Auto-Population) **New in v3.2**
|
||||||
```sql
|
```sql
|
||||||
-- Machine records created from PC data
|
-- Machine records created from PC data
|
||||||
INSERT INTO machines (
|
INSERT INTO machines (
|
||||||
|
|||||||
@@ -219,9 +219,9 @@ echo Creating configuration file...
|
|||||||
## Security Best Practices
|
## Security Best Practices
|
||||||
|
|
||||||
### 1. Never Hardcode API Keys
|
### 1. Never Hardcode API Keys
|
||||||
- ❌ Don't put API keys directly in scripts
|
- Don't put API keys directly in scripts
|
||||||
- ✅ Use environment variables or config files
|
- Use environment variables or config files
|
||||||
- ✅ Add `dashboard-config.json` to `.gitignore`
|
- Add `dashboard-config.json` to `.gitignore`
|
||||||
|
|
||||||
### 2. Secure Storage on Client PCs
|
### 2. Secure Storage on Client PCs
|
||||||
```powershell
|
```powershell
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ foreach ($interface in $networkInterfaces) {
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🏭 Manufacturing/Shopfloor Configuration
|
## Manufacturing/Shopfloor Configuration
|
||||||
|
|
||||||
### DNC (Direct Numerical Control) System Data
|
### DNC (Direct Numerical Control) System Data
|
||||||
| Field | Source | Type | Description |
|
| Field | Source | Type | Description |
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ Deploy-With-PsExec.bat
|
|||||||
#### Group Policy Deployment
|
#### Group Policy Deployment
|
||||||
1. **Copy Scripts**: Place in network share accessible to all target computers
|
1. **Copy Scripts**: Place in network share accessible to all target computers
|
||||||
2. **Create GPO**: New Group Policy Object for computer configuration
|
2. **Create GPO**: New Group Policy Object for computer configuration
|
||||||
3. **Add Startup Script**: Computer Configuration → Policies → Windows Settings → Scripts → Startup
|
3. **Add Startup Script**: Computer Configuration Policies Windows Settings Scripts Startup
|
||||||
4. **Configure Path**: Point to network share location of `Update-PC-CompleteAsset.bat`
|
4. **Configure Path**: Point to network share location of `Update-PC-CompleteAsset.bat`
|
||||||
5. **Apply to OUs**: Link GPO to appropriate Organizational Units
|
5. **Apply to OUs**: Link GPO to appropriate Organizational Units
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ Register-ScheduledTask -TaskName "GE Asset Collection" -Action $action -Trigger
|
|||||||
### Startup Script Integration
|
### Startup Script Integration
|
||||||
```batch
|
```batch
|
||||||
REM Add to computer startup scripts
|
REM Add to computer startup scripts
|
||||||
REM Computer Configuration → Policies → Windows Settings → Scripts → Startup
|
REM Computer Configuration Policies Windows Settings Scripts Startup
|
||||||
|
|
||||||
@echo off
|
@echo off
|
||||||
timeout 60 >nul 2>&1
|
timeout 60 >nul 2>&1
|
||||||
@@ -307,7 +307,7 @@ Update-PC-CompleteAsset.ps1 -TestConnections
|
|||||||
whoami /priv
|
whoami /priv
|
||||||
|
|
||||||
# Run as administrator
|
# Run as administrator
|
||||||
Right-click → "Run as administrator"
|
Right-click "Run as administrator"
|
||||||
|
|
||||||
# Service account configuration
|
# Service account configuration
|
||||||
# Configure service account with:
|
# Configure service account with:
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ function Get-PCType {
|
|||||||
- `$Hostname` (string) - Computer hostname
|
- `$Hostname` (string) - Computer hostname
|
||||||
|
|
||||||
**Pattern Matching**:
|
**Pattern Matching**:
|
||||||
- `H###` patterns → `M###` (H123 → M123)
|
- `H###` patterns `M###` (H123 M123)
|
||||||
- `G###` patterns → `M###` (G456 → M456)
|
- `G###` patterns `M###` (G456 M456)
|
||||||
- Regex: `[HG](\d{3})`
|
- Regex: `[HG](\d{3})`
|
||||||
|
|
||||||
**Returns**: `[string]` - Formatted machine number or `$null`
|
**Returns**: `[string]` - Formatted machine number or `$null`
|
||||||
@@ -162,7 +162,7 @@ $response = Invoke-RestMethod -Uri $uri -Method Get -TimeoutSec 30
|
|||||||
|
|
||||||
**Payload Construction**: Creates comprehensive HTTP POST payload with structured data
|
**Payload Construction**: Creates comprehensive HTTP POST payload with structured data
|
||||||
|
|
||||||
**Manufacturing Data Handling** ⭐ **Enhanced in v3.0**:
|
**Manufacturing Data Handling** **Enhanced in v3.0**:
|
||||||
```powershell
|
```powershell
|
||||||
# DualPath and Registry Architecture Data
|
# DualPath and Registry Architecture Data
|
||||||
$postData.dncDualPathEnabled = $geInfo.DualPathEnabled
|
$postData.dncDualPathEnabled = $geInfo.DualPathEnabled
|
||||||
@@ -258,7 +258,7 @@ $dncConfig = @{
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
#### `Get-GERegistryInfo` ⭐ **New in v3.0**
|
#### `Get-GERegistryInfo` **New in v3.0**
|
||||||
**Purpose**: Comprehensive GE Aircraft Engines registry architecture analysis with DualPath detection
|
**Purpose**: Comprehensive GE Aircraft Engines registry architecture analysis with DualPath detection
|
||||||
**Returns**: `[hashtable]` - Complete registry architecture and DualPath configuration
|
**Returns**: `[hashtable]` - Complete registry architecture and DualPath configuration
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ This directory contains comprehensive technical documentation for the GE Manufac
|
|||||||
- Error handling patterns and best practices
|
- Error handling patterns and best practices
|
||||||
- Code examples and usage patterns
|
- Code examples and usage patterns
|
||||||
|
|
||||||
### 🚀 [DEPLOYMENT_GUIDE.md](DEPLOYMENT_GUIDE.md)
|
### [DEPLOYMENT_GUIDE.md](DEPLOYMENT_GUIDE.md)
|
||||||
**Enterprise deployment strategies and procedures**
|
**Enterprise deployment strategies and procedures**
|
||||||
- Single PC and multiple PC deployment methods
|
- Single PC and multiple PC deployment methods
|
||||||
- Enterprise integration (Group Policy, SCCM, Tanium)
|
- Enterprise integration (Group Policy, SCCM, Tanium)
|
||||||
@@ -117,4 +117,4 @@ When updating scripts or functionality:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**📚 Comprehensive documentation for enterprise manufacturing asset management**
|
** Comprehensive documentation for enterprise manufacturing asset management**
|
||||||
@@ -443,7 +443,7 @@ Located in `winrm-https/` folder. These scripts configure secure WinRM over HTTP
|
|||||||
┌─────────────────────────────────────────────────────────────────┐
|
┌─────────────────────────────────────────────────────────────────┐
|
||||||
│ ShopDB API Server │
|
│ ShopDB API Server │
|
||||||
│ ┌──────────────────────────────────────────────────────────┐ │
|
│ ┌──────────────────────────────────────────────────────────┐ │
|
||||||
│ │ api.asp (IIS) → MySQL Database │ │
|
│ │ api.asp (IIS) MySQL Database │ │
|
||||||
│ └──────────────────────────────────────────────────────────┘ │
|
│ └──────────────────────────────────────────────────────────┘ │
|
||||||
└─────────────────────────────────────────────────────────────────┘
|
└─────────────────────────────────────────────────────────────────┘
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ The GE Manufacturing Asset Management System is a comprehensive PowerShell-based
|
|||||||
- Gateway and subnet mapping
|
- Gateway and subnet mapping
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `Get-GERegistryInfo` ⭐ **New in v3.0**
|
#### `Get-GERegistryInfo` **New in v3.0**
|
||||||
```powershell
|
```powershell
|
||||||
# Dual registry architecture analysis
|
# Dual registry architecture analysis
|
||||||
- 32-bit registry path: HKLM:\SOFTWARE\GE Aircraft Engines
|
- 32-bit registry path: HKLM:\SOFTWARE\GE Aircraft Engines
|
||||||
@@ -109,7 +109,7 @@ The GE Manufacturing Asset Management System is a comprehensive PowerShell-based
|
|||||||
|
|
||||||
### Phase 1: System Discovery
|
### Phase 1: System Discovery
|
||||||
```
|
```
|
||||||
PC Environment → System Info Collection → Classification Engine
|
PC Environment System Info Collection Classification Engine
|
||||||
│
|
│
|
||||||
├─ Hardware Identification (WMI/CIM)
|
├─ Hardware Identification (WMI/CIM)
|
||||||
├─ Operating System Analysis
|
├─ Operating System Analysis
|
||||||
@@ -119,7 +119,7 @@ PC Environment → System Info Collection → Classification Engine
|
|||||||
|
|
||||||
### Phase 2: Manufacturing Intelligence
|
### Phase 2: Manufacturing Intelligence
|
||||||
```
|
```
|
||||||
Registry Analysis → Manufacturing Config → Service Architecture
|
Registry Analysis Manufacturing Config Service Architecture
|
||||||
│
|
│
|
||||||
├─ GE Aircraft Engines Detection (32-bit/64-bit)
|
├─ GE Aircraft Engines Detection (32-bit/64-bit)
|
||||||
├─ DualPath Configuration Analysis
|
├─ DualPath Configuration Analysis
|
||||||
@@ -129,7 +129,7 @@ Registry Analysis → Manufacturing Config → Service Architecture
|
|||||||
|
|
||||||
### Phase 3: Network Topology
|
### Phase 3: Network Topology
|
||||||
```
|
```
|
||||||
Network Interfaces → Machine Network Detection → Communication Analysis
|
Network Interfaces Machine Network Detection Communication Analysis
|
||||||
│
|
│
|
||||||
├─ Active Interface Enumeration
|
├─ Active Interface Enumeration
|
||||||
├─ Machine Network Identification (192.168.*.*)
|
├─ Machine Network Identification (192.168.*.*)
|
||||||
@@ -139,7 +139,7 @@ Network Interfaces → Machine Network Detection → Communication Analysis
|
|||||||
|
|
||||||
### Phase 4: Data Consolidation
|
### Phase 4: Data Consolidation
|
||||||
```
|
```
|
||||||
Collected Data → JSON Serialization → API Payload Construction
|
Collected Data JSON Serialization API Payload Construction
|
||||||
│
|
│
|
||||||
├─ System Information Packaging
|
├─ System Information Packaging
|
||||||
├─ Manufacturing Configuration JSON
|
├─ Manufacturing Configuration JSON
|
||||||
@@ -149,7 +149,7 @@ Collected Data → JSON Serialization → API Payload Construction
|
|||||||
|
|
||||||
### Phase 5: Centralized Storage
|
### Phase 5: Centralized Storage
|
||||||
```
|
```
|
||||||
Dashboard API → Database Normalization → Relational Storage
|
Dashboard API Database Normalization Relational Storage
|
||||||
│
|
│
|
||||||
├─ PC Table (Basic System Information)
|
├─ PC Table (Basic System Information)
|
||||||
├─ PC_DNC_Config Table (Manufacturing Settings + Registry Architecture)
|
├─ PC_DNC_Config Table (Manufacturing Settings + Registry Architecture)
|
||||||
@@ -158,9 +158,9 @@ Dashboard API → Database Normalization → Relational Storage
|
|||||||
└─ Machines Table (Auto-populated from PC machine numbers)
|
└─ Machines Table (Auto-populated from PC machine numbers)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Phase 6: Machine Auto-Population ⭐ **New in v3.2**
|
### Phase 6: Machine Auto-Population **New in v3.2**
|
||||||
```
|
```
|
||||||
PC Data Collection → Machine Number Extraction → Automated Machine Creation
|
PC Data Collection Machine Number Extraction Automated Machine Creation
|
||||||
│ │ │
|
│ │ │
|
||||||
├─ Registry Scan ├─ Hostname Patterns ├─ Machine Records
|
├─ Registry Scan ├─ Hostname Patterns ├─ Machine Records
|
||||||
├─ DNC Detection ├─ GE Machine Numbers ├─ PC Relationships
|
├─ DNC Detection ├─ GE Machine Numbers ├─ PC Relationships
|
||||||
@@ -190,12 +190,12 @@ function Get-GEMachineNumber {
|
|||||||
# Pattern matching for GE hostname conventions
|
# Pattern matching for GE hostname conventions
|
||||||
if ($Hostname -match '[HG](\d{3})') {
|
if ($Hostname -match '[HG](\d{3})') {
|
||||||
$machineNum = $Matches[1]
|
$machineNum = $Matches[1]
|
||||||
return "M$machineNum" # Convert H123/G123 → M123
|
return "M$machineNum" # Convert H123/G123 M123
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Machine Auto-Population Architecture ⭐ **New in v3.2**
|
### Machine Auto-Population Architecture **New in v3.2**
|
||||||
|
|
||||||
The system automatically creates machine records from shopfloor PC data using a multi-phase approach:
|
The system automatically creates machine records from shopfloor PC data using a multi-phase approach:
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ function Get-GEMachineNumber {
|
|||||||
|
|
||||||
# Priority 2: Hostname pattern matching
|
# Priority 2: Hostname pattern matching
|
||||||
if ($Hostname -match '[HG](\d{3})') {
|
if ($Hostname -match '[HG](\d{3})') {
|
||||||
return "M$($Matches[1])" # H3103 → M3103
|
return "M$($Matches[1])" # H3103 M3103
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -260,7 +260,7 @@ END
|
|||||||
- **Multiple PC Handling**: Machine 0615 has 5 connected PCs
|
- **Multiple PC Handling**: Machine 0615 has 5 connected PCs
|
||||||
- **Role Classification**: Control, HMI, Engineering, Backup PCs identified
|
- **Role Classification**: Control, HMI, Engineering, Backup PCs identified
|
||||||
|
|
||||||
### Dual Registry Architecture Handling ⭐ **New in v3.0**
|
### Dual Registry Architecture Handling **New in v3.0**
|
||||||
```powershell
|
```powershell
|
||||||
# Intelligent priority system prevents data overwrites
|
# Intelligent priority system prevents data overwrites
|
||||||
if ($geInfo.DualPathEnabled -eq $null) {
|
if ($geInfo.DualPathEnabled -eq $null) {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ Your Computer Remote PC
|
|||||||
│ CN=*.logon.ds.ge.com │
|
│ CN=*.logon.ds.ge.com │
|
||||||
│ Self-signed (untrusted) │
|
│ Self-signed (untrusted) │
|
||||||
│ │
|
│ │
|
||||||
├─ ❌ ERROR: Untrusted certificate │
|
├─ ERROR: Untrusted certificate │
|
||||||
│ │
|
│ │
|
||||||
└─ Must use -SessionOption
|
└─ Must use -SessionOption
|
||||||
to skip validation
|
to skip validation
|
||||||
@@ -136,7 +136,7 @@ Your Computer Remote PC
|
|||||||
├─ Checks issuer: Shopfloor WinRM CA │
|
├─ Checks issuer: Shopfloor WinRM CA │
|
||||||
├─ Do I trust this issuer? │
|
├─ Do I trust this issuer? │
|
||||||
├─ YES! (CA is in Trusted Root) │
|
├─ YES! (CA is in Trusted Root) │
|
||||||
├─ ✓ Certificate trusted │
|
├─ Certificate trusted │
|
||||||
│ │
|
│ │
|
||||||
└─ Connection succeeds! ◄─────────────┘
|
└─ Connection succeeds! ◄─────────────┘
|
||||||
No -SessionOption needed!
|
No -SessionOption needed!
|
||||||
@@ -230,7 +230,7 @@ $cert = Import-PfxCertificate `
|
|||||||
|
|
||||||
# Test basic connectivity - NO -SessionOption needed!
|
# Test basic connectivity - NO -SessionOption needed!
|
||||||
Test-WSMan -ComputerName g9kn7pz3esf.logon.ds.ge.com -UseSSL -Port 5986
|
Test-WSMan -ComputerName g9kn7pz3esf.logon.ds.ge.com -UseSSL -Port 5986
|
||||||
# ✓ Works! No certificate errors!
|
# Works! No certificate errors!
|
||||||
|
|
||||||
# Get credentials
|
# Get credentials
|
||||||
$cred = Get-Credential
|
$cred = Get-Credential
|
||||||
@@ -238,7 +238,7 @@ $cred = Get-Credential
|
|||||||
# Interactive session - NO -SessionOption needed!
|
# Interactive session - NO -SessionOption needed!
|
||||||
Enter-PSSession -ComputerName g9kn7pz3esf.logon.ds.ge.com `
|
Enter-PSSession -ComputerName g9kn7pz3esf.logon.ds.ge.com `
|
||||||
-Credential $cred -UseSSL -Port 5986
|
-Credential $cred -UseSSL -Port 5986
|
||||||
# ✓ Connected! No certificate warnings!
|
# Connected! No certificate warnings!
|
||||||
|
|
||||||
# Run remote command
|
# Run remote command
|
||||||
Invoke-Command -ComputerName g9kn7pz3esf.logon.ds.ge.com `
|
Invoke-Command -ComputerName g9kn7pz3esf.logon.ds.ge.com `
|
||||||
@@ -265,10 +265,10 @@ Enter-PSSession -ComputerName g9kn7pz3esf.logon.ds.ge.com `
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Problems:**
|
**Problems:**
|
||||||
- ❌ Certificate validation bypassed (insecure)
|
- Certificate validation bypassed (insecure)
|
||||||
- ❌ Same certificate on all 175 PCs
|
- Same certificate on all 175 PCs
|
||||||
- ❌ If compromised, affects all PCs
|
- If compromised, affects all PCs
|
||||||
- ❌ Certificate CN mismatch errors
|
- Certificate CN mismatch errors
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -281,12 +281,12 @@ Enter-PSSession -ComputerName g9kn7pz3esf.logon.ds.ge.com `
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Benefits:**
|
**Benefits:**
|
||||||
- ✅ Proper certificate validation (secure)
|
- Proper certificate validation (secure)
|
||||||
- ✅ Each PC has its own certificate
|
- Each PC has its own certificate
|
||||||
- ✅ If one compromised, only affects one PC
|
- If one compromised, only affects one PC
|
||||||
- ✅ Proper hostname in certificate (no CN mismatch)
|
- Proper hostname in certificate (no CN mismatch)
|
||||||
- ✅ Easy to revoke individual certificates
|
- Easy to revoke individual certificates
|
||||||
- ✅ Professional enterprise approach
|
- Professional enterprise approach
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -380,9 +380,9 @@ When you connect, Windows automatically validates:
|
|||||||
↓
|
↓
|
||||||
4. YES! Found in Cert:\LocalMachine\Root
|
4. YES! Found in Cert:\LocalMachine\Root
|
||||||
↓
|
↓
|
||||||
5. ✓ Certificate trusted
|
5. Certificate trusted
|
||||||
↓
|
↓
|
||||||
6. ✓ Connection allowed
|
6. Connection allowed
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ STEP 3: Verify WinRM Configuration
|
|||||||
STEP 4: Test Local HTTPS Connection
|
STEP 4: Test Local HTTPS Connection
|
||||||
[OK] Local HTTPS connection successful
|
[OK] Local HTTPS connection successful
|
||||||
|
|
||||||
✅ Test setup complete!
|
Test setup complete!
|
||||||
```
|
```
|
||||||
|
|
||||||
**If you see errors:**
|
**If you see errors:**
|
||||||
@@ -175,7 +175,7 @@ CsName OsName WindowsVersion
|
|||||||
YOUR-PC Microsoft Windows 11 Pro 10.0.22631
|
YOUR-PC Microsoft Windows 11 Pro 10.0.22631
|
||||||
```
|
```
|
||||||
|
|
||||||
**✅ Success!** If this works, you're ready to move to the next phase.
|
** Success!** If this works, you're ready to move to the next phase.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -338,7 +338,7 @@ Failed: 0
|
|||||||
Collection completed. Success: 3, Failed: 0
|
Collection completed. Success: 3, Failed: 0
|
||||||
```
|
```
|
||||||
|
|
||||||
**✅ Success!** If this works, you're ready for full deployment.
|
** Success!** If this works, you're ready for full deployment.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -754,14 +754,14 @@ Get-Content .\logs\remote-collection-https.log -Tail 50
|
|||||||
|
|
||||||
Follow these phases:
|
Follow these phases:
|
||||||
|
|
||||||
1. ✅ **Phase 1:** Test on single device (your computer)
|
1. **Phase 1:** Test on single device (your computer)
|
||||||
2. ✅ **Phase 2:** Test on 3-5 shopfloor PCs
|
2. **Phase 2:** Test on 3-5 shopfloor PCs
|
||||||
3. ✅ **Phase 3:** Deploy to all 175 PCs in batches
|
3. **Phase 3:** Deploy to all 175 PCs in batches
|
||||||
4. ✅ **Daily Ops:** Run automated collection
|
4. **Daily Ops:** Run automated collection
|
||||||
|
|
||||||
**Total Time:**
|
**Total Time:**
|
||||||
- Phase 1: 15-30 minutes
|
- Phase 1: 15-30 minutes
|
||||||
- Phase 2: 1-2 hours
|
- Phase 2: 1-2 hours
|
||||||
- Phase 3: 4-8 hours (depending on method)
|
- Phase 3: 4-8 hours (depending on method)
|
||||||
|
|
||||||
**Good luck with your deployment!** 🚀
|
**Good luck with your deployment!**
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ New-SmbShare -Name "WinRM-HTTPS" -Path $deployPath -FullAccess "Everyone"
|
|||||||
**Or manually:**
|
**Or manually:**
|
||||||
1. Create folder: `C:\Deployment\WinRM-HTTPS`
|
1. Create folder: `C:\Deployment\WinRM-HTTPS`
|
||||||
2. Copy all files from `winrm-https` folder
|
2. Copy all files from `winrm-https` folder
|
||||||
3. Right-click folder → Properties → Sharing → Advanced Sharing
|
3. Right-click folder Properties Sharing Advanced Sharing
|
||||||
4. Check "Share this folder"
|
4. Check "Share this folder"
|
||||||
5. Share name: `WinRM-HTTPS`
|
5. Share name: `WinRM-HTTPS`
|
||||||
6. Permissions: Give "Everyone" Read access (or specific security group)
|
6. Permissions: Give "Everyone" Read access (or specific security group)
|
||||||
@@ -49,10 +49,10 @@ Get-ChildItem "\\SERVER\WinRM-HTTPS"
|
|||||||
```
|
```
|
||||||
|
|
||||||
Expected files:
|
Expected files:
|
||||||
- ✅ `Deploy-WinRM-HTTPS.bat`
|
- `Deploy-WinRM-HTTPS.bat`
|
||||||
- ✅ `Setup-WinRM-HTTPS.ps1`
|
- `Setup-WinRM-HTTPS.ps1`
|
||||||
- ✅ `wildcard-logon-ds-ge-com-20251017.pfx`
|
- `wildcard-logon-ds-ge-com-20251017.pfx`
|
||||||
- ✅ Other PS1 scripts
|
- Other PS1 scripts
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -105,13 +105,13 @@ Include everything for troubleshooting:
|
|||||||
6. Wait for completion
|
6. Wait for completion
|
||||||
|
|
||||||
**Advantages:**
|
**Advantages:**
|
||||||
- ✅ Simple - no copying needed
|
- Simple - no copying needed
|
||||||
- ✅ Always uses latest files
|
- Always uses latest files
|
||||||
- ✅ No local disk space used
|
- No local disk space used
|
||||||
|
|
||||||
**Disadvantages:**
|
**Disadvantages:**
|
||||||
- ⚠️ Requires network connectivity during install
|
- Requires network connectivity during install
|
||||||
- ⚠️ Slower if network is congested
|
- Slower if network is congested
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -139,13 +139,13 @@ Deploy-WinRM-HTTPS.bat
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Advantages:**
|
**Advantages:**
|
||||||
- ✅ Faster execution
|
- Faster execution
|
||||||
- ✅ Works if network connection lost
|
- Works if network connection lost
|
||||||
- ✅ Can verify files before running
|
- Can verify files before running
|
||||||
|
|
||||||
**Disadvantages:**
|
**Disadvantages:**
|
||||||
- ⚠️ Uses local disk space
|
- Uses local disk space
|
||||||
- ⚠️ Extra copy step
|
- Extra copy step
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -193,14 +193,14 @@ foreach ($hostname in $targetPCs) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Advantages:**
|
**Advantages:**
|
||||||
- ✅ Deploy to many PCs from one location
|
- Deploy to many PCs from one location
|
||||||
- ✅ No physical access needed
|
- No physical access needed
|
||||||
- ✅ Can run overnight/batch
|
- Can run overnight/batch
|
||||||
|
|
||||||
**Disadvantages:**
|
**Disadvantages:**
|
||||||
- ⚠️ Requires existing remote access (WinRM or admin shares)
|
- Requires existing remote access (WinRM or admin shares)
|
||||||
- ⚠️ More complex
|
- More complex
|
||||||
- ⚠️ Password visible in script (use secure credential management)
|
- Password visible in script (use secure credential management)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -219,8 +219,8 @@ foreach ($hostname in $targetPCs) {
|
|||||||
- Edit GPO
|
- Edit GPO
|
||||||
|
|
||||||
3. **Add Startup Script:**
|
3. **Add Startup Script:**
|
||||||
- Computer Configuration → Policies → Windows Settings → Scripts
|
- Computer Configuration Policies Windows Settings Scripts
|
||||||
- Startup → Add
|
- Startup Add
|
||||||
- Script: `\\DOMAIN\NETLOGON\Scripts\WinRM-HTTPS\Deploy-WinRM-HTTPS.bat`
|
- Script: `\\DOMAIN\NETLOGON\Scripts\WinRM-HTTPS\Deploy-WinRM-HTTPS.bat`
|
||||||
|
|
||||||
4. **Link GPO to OU:**
|
4. **Link GPO to OU:**
|
||||||
@@ -228,14 +228,14 @@ foreach ($hostname in $targetPCs) {
|
|||||||
- PCs will run script on next reboot
|
- PCs will run script on next reboot
|
||||||
|
|
||||||
**Advantages:**
|
**Advantages:**
|
||||||
- ✅ Automated deployment
|
- Automated deployment
|
||||||
- ✅ Centrally managed
|
- Centrally managed
|
||||||
- ✅ Runs with SYSTEM privileges
|
- Runs with SYSTEM privileges
|
||||||
|
|
||||||
**Disadvantages:**
|
**Disadvantages:**
|
||||||
- ⚠️ Requires domain environment
|
- Requires domain environment
|
||||||
- ⚠️ Requires restart
|
- Requires restart
|
||||||
- ⚠️ Password handling more complex
|
- Password handling more complex
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ REM Set on each PC or via GPO
|
|||||||
setx WINRM_CERT_PASS "XqHuyaLZSyCYEcpsMz6h5" /M
|
setx WINRM_CERT_PASS "XqHuyaLZSyCYEcpsMz6h5" /M
|
||||||
```
|
```
|
||||||
|
|
||||||
**⚠️ Never:**
|
** Never:**
|
||||||
- Hardcode password in batch file on network share (readable by everyone)
|
- Hardcode password in batch file on network share (readable by everyone)
|
||||||
- Email password in plaintext
|
- Email password in plaintext
|
||||||
- Store password in unencrypted text file
|
- Store password in unencrypted text file
|
||||||
@@ -293,7 +293,7 @@ Grant-SmbShareAccess -Name "WinRM-HTTPS" -AccountName "DOMAIN\IT Admins" -Access
|
|||||||
The certificate PFX file contains the private key. Protect it:
|
The certificate PFX file contains the private key. Protect it:
|
||||||
|
|
||||||
1. **Use share permissions** to restrict access
|
1. **Use share permissions** to restrict access
|
||||||
2. **Use certificate password** (you did ✅)
|
2. **Use certificate password** (you did )
|
||||||
3. **Monitor access** to the share
|
3. **Monitor access** to the share
|
||||||
4. **Delete from share** after deployment complete
|
4. **Delete from share** after deployment complete
|
||||||
|
|
||||||
@@ -315,7 +315,7 @@ The certificate PFX file contains the private key. Protect it:
|
|||||||
```
|
```
|
||||||
For each test PC:
|
For each test PC:
|
||||||
1. Navigate to \\SERVER\WinRM-HTTPS
|
1. Navigate to \\SERVER\WinRM-HTTPS
|
||||||
2. Right-click Deploy-WinRM-HTTPS.bat → Run as Administrator
|
2. Right-click Deploy-WinRM-HTTPS.bat Run as Administrator
|
||||||
3. Enter password when prompted
|
3. Enter password when prompted
|
||||||
4. Verify success
|
4. Verify success
|
||||||
5. Test connection from management server
|
5. Test connection from management server
|
||||||
@@ -378,7 +378,7 @@ Write-Host "Share created: \\$env:COMPUTERNAME\WinRM-HTTPS"
|
|||||||
|
|
||||||
**On test PC (G1JJVH63ESF):**
|
**On test PC (G1JJVH63ESF):**
|
||||||
1. Open Explorer: `\\MANAGEMENT-SERVER\WinRM-HTTPS`
|
1. Open Explorer: `\\MANAGEMENT-SERVER\WinRM-HTTPS`
|
||||||
2. Right-click `Deploy-WinRM-HTTPS.bat` → Run as Administrator
|
2. Right-click `Deploy-WinRM-HTTPS.bat` Run as Administrator
|
||||||
3. Enter password: `XqHuyaLZSyCYEcpsMz6h5`
|
3. Enter password: `XqHuyaLZSyCYEcpsMz6h5`
|
||||||
4. Wait for completion
|
4. Wait for completion
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ Get-SmbShareAccess -Name "WinRM-HTTPS"
|
|||||||
### Problem: "Access Denied" running batch file
|
### Problem: "Access Denied" running batch file
|
||||||
|
|
||||||
**Solution:**
|
**Solution:**
|
||||||
- Right-click → Run as Administrator
|
- Right-click Run as Administrator
|
||||||
- User must be local admin on PC
|
- User must be local admin on PC
|
||||||
- Check UAC settings
|
- Check UAC settings
|
||||||
|
|
||||||
@@ -514,15 +514,15 @@ Save as `README.txt` in the share.
|
|||||||
|
|
||||||
**Best Practice for Your Scenario:**
|
**Best Practice for Your Scenario:**
|
||||||
|
|
||||||
1. ✅ Create network share: `\\SERVER\WinRM-HTTPS`
|
1. Create network share: `\\SERVER\WinRM-HTTPS`
|
||||||
2. ✅ Include:
|
2. Include:
|
||||||
- `Deploy-WinRM-HTTPS.bat`
|
- `Deploy-WinRM-HTTPS.bat`
|
||||||
- `Setup-WinRM-HTTPS.ps1`
|
- `Setup-WinRM-HTTPS.ps1`
|
||||||
- `wildcard-logon-ds-ge-com-20251017.pfx`
|
- `wildcard-logon-ds-ge-com-20251017.pfx`
|
||||||
3. ✅ Deploy to 3-5 test PCs manually
|
3. Deploy to 3-5 test PCs manually
|
||||||
4. ✅ Verify each deployment
|
4. Verify each deployment
|
||||||
5. ✅ Deploy to remaining PCs in batches
|
5. Deploy to remaining PCs in batches
|
||||||
6. ✅ Remove certificate from share when done
|
6. Remove certificate from share when done
|
||||||
|
|
||||||
**Certificate Password Storage:**
|
**Certificate Password Storage:**
|
||||||
- Store in password manager
|
- Store in password manager
|
||||||
@@ -530,7 +530,7 @@ Save as `README.txt` in the share.
|
|||||||
- Use encrypted files for automation
|
- Use encrypted files for automation
|
||||||
|
|
||||||
**The batch files handle:**
|
**The batch files handle:**
|
||||||
- ✅ Administrator check
|
- Administrator check
|
||||||
- ✅ File verification
|
- File verification
|
||||||
- ✅ Error handling
|
- Error handling
|
||||||
- ✅ User feedback
|
- User feedback
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
**Objective**: Deploy secure WinRM over HTTPS to 175 shopfloor PCs using a wildcard certificate for `*.logon.ds.ge.com`
|
**Objective**: Deploy secure WinRM over HTTPS to 175 shopfloor PCs using a wildcard certificate for `*.logon.ds.ge.com`
|
||||||
|
|
||||||
**Status**: ✅ READY FOR TESTING
|
**Status**: READY FOR TESTING
|
||||||
|
|
||||||
**Certificate Generated**: `wildcard-logon-ds-ge-com-20251017.pfx`
|
**Certificate Generated**: `wildcard-logon-ds-ge-com-20251017.pfx`
|
||||||
**Certificate Password**: `XqHuyaLZSyCYEcpsMz6h5`
|
**Certificate Password**: `XqHuyaLZSyCYEcpsMz6h5`
|
||||||
@@ -45,13 +45,13 @@
|
|||||||
|
|
||||||
## Key Features Implemented
|
## Key Features Implemented
|
||||||
|
|
||||||
### ✅ Certificate Generation
|
### Certificate Generation
|
||||||
- Self-signed wildcard certificate for `*.logon.ds.ge.com`
|
- Self-signed wildcard certificate for `*.logon.ds.ge.com`
|
||||||
- Alternative generation methods to avoid smart card conflicts
|
- Alternative generation methods to avoid smart card conflicts
|
||||||
- 2048-bit RSA with SHA256
|
- 2048-bit RSA with SHA256
|
||||||
- Valid for 2 years (expires 2027-10-17)
|
- Valid for 2 years (expires 2027-10-17)
|
||||||
|
|
||||||
### ✅ Deployment Scripts
|
### Deployment Scripts
|
||||||
- **Two deployment methods**:
|
- **Two deployment methods**:
|
||||||
- `Deploy-WinRM-HTTPS.bat` - Secure (prompts for password)
|
- `Deploy-WinRM-HTTPS.bat` - Secure (prompts for password)
|
||||||
- `Deploy-WinRM-HTTPS-AutoPassword.bat` - Testing (auto-password)
|
- `Deploy-WinRM-HTTPS-AutoPassword.bat` - Testing (auto-password)
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
- Execution policy bypass (`-ExecutionPolicy Bypass`)
|
- Execution policy bypass (`-ExecutionPolicy Bypass`)
|
||||||
- Network share compatible
|
- Network share compatible
|
||||||
|
|
||||||
### ✅ Comprehensive Logging
|
### Comprehensive Logging
|
||||||
- **Log Location**: `S:\DT\ADATA\SCRIPT\DEPLOY\LOGS\`
|
- **Log Location**: `S:\DT\ADATA\SCRIPT\DEPLOY\LOGS\`
|
||||||
- **Log Format**: `HOSTNAME-YYYYMMDD-HHMMSS.txt`
|
- **Log Format**: `HOSTNAME-YYYYMMDD-HHMMSS.txt`
|
||||||
- **Logged Information**:
|
- **Logged Information**:
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
- Success/failure status
|
- Success/failure status
|
||||||
- All error messages
|
- All error messages
|
||||||
|
|
||||||
### ✅ WinRM HTTPS Configuration
|
### WinRM HTTPS Configuration
|
||||||
- Creates HTTPS listener on port 5986
|
- Creates HTTPS listener on port 5986
|
||||||
- Uses wildcard certificate for all PCs
|
- Uses wildcard certificate for all PCs
|
||||||
- Constructs FQDN: `hostname.logon.ds.ge.com`
|
- Constructs FQDN: `hostname.logon.ds.ge.com`
|
||||||
@@ -80,13 +80,13 @@
|
|||||||
- Enables certificate authentication
|
- Enables certificate authentication
|
||||||
- Maintains HTTP listener (port 5985)
|
- Maintains HTTP listener (port 5985)
|
||||||
|
|
||||||
### ✅ Testing & Validation
|
### Testing & Validation
|
||||||
- Test scripts for connectivity verification
|
- Test scripts for connectivity verification
|
||||||
- Log viewer with filtering capabilities
|
- Log viewer with filtering capabilities
|
||||||
- Summary report generation
|
- Summary report generation
|
||||||
- Remote connection examples
|
- Remote connection examples
|
||||||
|
|
||||||
### ✅ Documentation
|
### Documentation
|
||||||
- Quick start guides
|
- Quick start guides
|
||||||
- Detailed deployment instructions
|
- Detailed deployment instructions
|
||||||
- Security best practices
|
- Security best practices
|
||||||
@@ -139,17 +139,17 @@ PowerShell.exe -NoProfile -ExecutionPolicy Bypass -Command ^
|
|||||||
### 1. Smart Card Device Error
|
### 1. Smart Card Device Error
|
||||||
**Problem**: Certificate generation failed with "smart card device is read-only"
|
**Problem**: Certificate generation failed with "smart card device is read-only"
|
||||||
**Solution**: Created alternative script using `certreq.exe` with fallback methods
|
**Solution**: Created alternative script using `certreq.exe` with fallback methods
|
||||||
**Status**: ✅ Resolved - Certificate generated successfully
|
**Status**: Resolved - Certificate generated successfully
|
||||||
|
|
||||||
### 2. LogFile Parameter Not Found
|
### 2. LogFile Parameter Not Found
|
||||||
**Problem**: Batch file tried to pass `-LogFile` parameter that didn't exist
|
**Problem**: Batch file tried to pass `-LogFile` parameter that didn't exist
|
||||||
**Solution**: Added `-LogFile` parameter to `Setup-WinRM-HTTPS.ps1` param block
|
**Solution**: Added `-LogFile` parameter to `Setup-WinRM-HTTPS.ps1` param block
|
||||||
**Status**: ✅ Resolved - Logging now works correctly
|
**Status**: Resolved - Logging now works correctly
|
||||||
|
|
||||||
### 3. WinRM HTTPS Listener Creation Failed (First Issue)
|
### 3. WinRM HTTPS Listener Creation Failed (First Issue)
|
||||||
**Problem**: Listener creation failed due to PowerShell string escaping issues
|
**Problem**: Listener creation failed due to PowerShell string escaping issues
|
||||||
**Solution**: Changed from `Invoke-Expression` to `cmd.exe /c` execution
|
**Solution**: Changed from `Invoke-Expression` to `cmd.exe /c` execution
|
||||||
**Status**: ✅ Resolved - Command execution fixed
|
**Status**: Resolved - Command execution fixed
|
||||||
|
|
||||||
### 4. Certificate CN Mismatch Error (Critical Fix)
|
### 4. Certificate CN Mismatch Error (Critical Fix)
|
||||||
**Problem**: Listener creation failed with error "The certificate CN and the hostname that were provided do not match"
|
**Problem**: Listener creation failed with error "The certificate CN and the hostname that were provided do not match"
|
||||||
@@ -177,23 +177,23 @@ winrm create ... @{Hostname="*.logon.ds.ge.com";...}
|
|||||||
- WinRM matches specific hostname against wildcard pattern
|
- WinRM matches specific hostname against wildcard pattern
|
||||||
- Certificate validation succeeds for all subdomains
|
- Certificate validation succeeds for all subdomains
|
||||||
|
|
||||||
**Status**: ✅ Resolved - Wildcard matching now works correctly
|
**Status**: Resolved - Wildcard matching now works correctly
|
||||||
**Documentation**: See `WILDCARD-CERT-FIX.txt` for detailed explanation
|
**Documentation**: See `WILDCARD-CERT-FIX.txt` for detailed explanation
|
||||||
|
|
||||||
### 5. Plaintext Password in Examples
|
### 5. Plaintext Password in Examples
|
||||||
**Problem**: Security concern with plaintext passwords in documentation
|
**Problem**: Security concern with plaintext passwords in documentation
|
||||||
**Solution**: Created `SECURE_CREDENTIAL_MANAGEMENT.md` and updated all examples
|
**Solution**: Created `SECURE_CREDENTIAL_MANAGEMENT.md` and updated all examples
|
||||||
**Status**: ✅ Resolved - All examples use secure methods
|
**Status**: Resolved - All examples use secure methods
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Deployment Workflow
|
## Deployment Workflow
|
||||||
|
|
||||||
### Phase 1: Preparation (CURRENT PHASE)
|
### Phase 1: Preparation (CURRENT PHASE)
|
||||||
1. ✅ Generate wildcard certificate
|
1. Generate wildcard certificate
|
||||||
2. ✅ Create deployment scripts
|
2. Create deployment scripts
|
||||||
3. ✅ Setup logging infrastructure
|
3. Setup logging infrastructure
|
||||||
4. ✅ Create documentation
|
4. Create documentation
|
||||||
5. ⏳ Copy certificate to deployment-package folder
|
5. ⏳ Copy certificate to deployment-package folder
|
||||||
6. ⏳ Copy deployment-package to network share
|
6. ⏳ Copy deployment-package to network share
|
||||||
7. ⏳ Set permissions on network share
|
7. ⏳ Set permissions on network share
|
||||||
@@ -230,9 +230,9 @@ winrm create ... @{Hostname="*.logon.ds.ge.com";...}
|
|||||||
**Hostname List**: `shopfloor-hostnames.txt`
|
**Hostname List**: `shopfloor-hostnames.txt`
|
||||||
|
|
||||||
**Example Hostnames**:
|
**Example Hostnames**:
|
||||||
- G1JJVH63ESF → g1jjvh63esf.logon.ds.ge.com
|
- G1JJVH63ESF g1jjvh63esf.logon.ds.ge.com
|
||||||
- G1JJXH63ESF → g1jjxh63esf.logon.ds.ge.com
|
- G1JJXH63ESF g1jjxh63esf.logon.ds.ge.com
|
||||||
- G9KN7PZ3ESF → g9kn7pz3esf.logon.ds.ge.com (test PC)
|
- G9KN7PZ3ESF g9kn7pz3esf.logon.ds.ge.com (test PC)
|
||||||
- ... (172 more)
|
- ... (172 more)
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -279,24 +279,24 @@ Get-Service WinRM | Select-Object Name, Status, StartType
|
|||||||
## Security Considerations
|
## Security Considerations
|
||||||
|
|
||||||
### Certificate Security
|
### Certificate Security
|
||||||
- ✅ Self-signed certificate (appropriate for internal use)
|
- Self-signed certificate (appropriate for internal use)
|
||||||
- ✅ Private key marked as exportable (for backup purposes)
|
- Private key marked as exportable (for backup purposes)
|
||||||
- ✅ Stored in Local Machine certificate store
|
- Stored in Local Machine certificate store
|
||||||
- ✅ 2048-bit RSA encryption
|
- 2048-bit RSA encryption
|
||||||
- ⚠️ Certificate password stored in deployment scripts (testing only)
|
- Certificate password stored in deployment scripts (testing only)
|
||||||
|
|
||||||
### Deployment Security
|
### Deployment Security
|
||||||
- ✅ Two versions: secure (production) and auto-password (testing)
|
- Two versions: secure (production) and auto-password (testing)
|
||||||
- ✅ Documentation emphasizes deleting auto-password version
|
- Documentation emphasizes deleting auto-password version
|
||||||
- ✅ Network share requires proper permissions
|
- Network share requires proper permissions
|
||||||
- ✅ Administrator privileges required for deployment
|
- Administrator privileges required for deployment
|
||||||
- ✅ All examples use secure credential methods
|
- All examples use secure credential methods
|
||||||
|
|
||||||
### Credential Management
|
### Credential Management
|
||||||
- ✅ Documented 5 secure methods in `SECURE_CREDENTIAL_MANAGEMENT.md`
|
- Documented 5 secure methods in `SECURE_CREDENTIAL_MANAGEMENT.md`
|
||||||
- ✅ No plaintext passwords in production examples
|
- No plaintext passwords in production examples
|
||||||
- ✅ Recommendations for Azure Key Vault integration
|
- Recommendations for Azure Key Vault integration
|
||||||
- ✅ Windows Credential Manager integration documented
|
- Windows Credential Manager integration documented
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -348,8 +348,8 @@ Executing WinRM HTTPS setup...
|
|||||||
## Files Ready for Deployment
|
## Files Ready for Deployment
|
||||||
|
|
||||||
### Required Files (Must Copy to Network Share)
|
### Required Files (Must Copy to Network Share)
|
||||||
- ✅ `deployment-package/` folder (all contents)
|
- `deployment-package/` folder (all contents)
|
||||||
- ⚠️ `wildcard-logon-ds-ge-com-20251017.pfx` (MUST ADD to deployment-package!)
|
- `wildcard-logon-ds-ge-com-20251017.pfx` (MUST ADD to deployment-package!)
|
||||||
|
|
||||||
### Network Share Setup
|
### Network Share Setup
|
||||||
```
|
```
|
||||||
@@ -405,25 +405,25 @@ Executing WinRM HTTPS setup...
|
|||||||
## Success Criteria
|
## Success Criteria
|
||||||
|
|
||||||
### Deployment Success
|
### Deployment Success
|
||||||
- ✅ Certificate imported to Local Machine store
|
- Certificate imported to Local Machine store
|
||||||
- ✅ HTTPS listener created on port 5986
|
- HTTPS listener created on port 5986
|
||||||
- ✅ Firewall rule "WinRM HTTPS-In" created
|
- Firewall rule "WinRM HTTPS-In" created
|
||||||
- ✅ WinRM service running and set to automatic
|
- WinRM service running and set to automatic
|
||||||
- ✅ Log file created with SUCCESS status
|
- Log file created with SUCCESS status
|
||||||
- ✅ No errors in log file
|
- No errors in log file
|
||||||
|
|
||||||
### Connectivity Success
|
### Connectivity Success
|
||||||
- ✅ `Test-WSMan` succeeds from management server
|
- `Test-WSMan` succeeds from management server
|
||||||
- ✅ Can create remote PSSession with `-UseSSL`
|
- Can create remote PSSession with `-UseSSL`
|
||||||
- ✅ Can execute remote commands via HTTPS
|
- Can execute remote commands via HTTPS
|
||||||
- ✅ Certificate validation passes
|
- Certificate validation passes
|
||||||
|
|
||||||
### Project Success
|
### Project Success
|
||||||
- ✅ All 175 PCs deployed successfully
|
- All 175 PCs deployed successfully
|
||||||
- ✅ All deployments logged
|
- All deployments logged
|
||||||
- ✅ Remote connectivity verified
|
- Remote connectivity verified
|
||||||
- ✅ Asset inventory updated
|
- Asset inventory updated
|
||||||
- ✅ Documentation complete
|
- Documentation complete
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -503,4 +503,4 @@ The WinRM HTTPS deployment project is **complete and ready for testing**. All sc
|
|||||||
|
|
||||||
**Document Version**: 1.0
|
**Document Version**: 1.0
|
||||||
**Last Updated**: 2025-10-17
|
**Last Updated**: 2025-10-17
|
||||||
**Status**: ✅ READY FOR TESTING
|
**Status**: READY FOR TESTING
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ This folder contains scripts and documentation for setting up secure WinRM over
|
|||||||
|------|-------------|
|
|------|-------------|
|
||||||
| **WINRM_HTTPS_DEPLOYMENT_GUIDE.md** | Complete deployment guide with troubleshooting |
|
| **WINRM_HTTPS_DEPLOYMENT_GUIDE.md** | Complete deployment guide with troubleshooting |
|
||||||
|
|
||||||
## 🚀 Quick Start
|
## Quick Start
|
||||||
|
|
||||||
### 1. Generate Certificate (Testing)
|
### 1. Generate Certificate (Testing)
|
||||||
|
|
||||||
@@ -84,14 +84,14 @@ $certPass = ConvertTo-SecureString "YourPassword" -AsPlainText -Force
|
|||||||
- Protect the PFX file password
|
- Protect the PFX file password
|
||||||
- Use `-SkipCertificateCheck` only for testing
|
- Use `-SkipCertificateCheck` only for testing
|
||||||
|
|
||||||
## 📊 Shopfloor PCs
|
## Shopfloor PCs
|
||||||
|
|
||||||
- **Total PCs**: 175
|
- **Total PCs**: 175
|
||||||
- **Source**: Database query filtered by `pctypeid = 3` (Shopfloor type)
|
- **Source**: Database query filtered by `pctypeid = 3` (Shopfloor type)
|
||||||
- **FQDN Format**: `{hostname}.logon.ds.ge.com`
|
- **FQDN Format**: `{hostname}.logon.ds.ge.com`
|
||||||
- **Example**: `G1JJVH63ESF.logon.ds.ge.com`
|
- **Example**: `G1JJVH63ESF.logon.ds.ge.com`
|
||||||
|
|
||||||
## 🔧 Workflow
|
## Workflow
|
||||||
|
|
||||||
1. **Generate/Obtain Certificate**
|
1. **Generate/Obtain Certificate**
|
||||||
- Use `Generate-WildcardCert.ps1` for testing
|
- Use `Generate-WildcardCert.ps1` for testing
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This guide covers secure methods for handling passwords and credentials in PowerShell, avoiding plaintext passwords in scripts and command history.
|
This guide covers secure methods for handling passwords and credentials in PowerShell, avoiding plaintext passwords in scripts and command history.
|
||||||
|
|
||||||
## ⚠️ Never Do This
|
## Never Do This
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# BAD - Password visible in script and command history
|
# BAD - Password visible in script and command history
|
||||||
@@ -18,7 +18,7 @@ $certPass = ConvertTo-SecureString "MyPassword123!" -AsPlainText -Force
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ✅ Secure Methods
|
## Secure Methods
|
||||||
|
|
||||||
### Method 1: Interactive Prompt (Most Secure for Manual Use)
|
### Method 1: Interactive Prompt (Most Secure for Manual Use)
|
||||||
|
|
||||||
@@ -92,10 +92,10 @@ $certPass = Import-Clixml -Path "C:\Secure\cert-password.xml"
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Important notes:**
|
**Important notes:**
|
||||||
- ✅ Encrypted files can ONLY be decrypted by the same user on the same computer
|
- Encrypted files can ONLY be decrypted by the same user on the same computer
|
||||||
- ✅ Safe to store in version control (but not recommended)
|
- Safe to store in version control (but not recommended)
|
||||||
- ⚠️ Won't work if script runs as different user (e.g., scheduled task with service account)
|
- Won't work if script runs as different user (e.g., scheduled task with service account)
|
||||||
- ⚠️ Won't work on different computer
|
- Won't work on different computer
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -131,10 +131,10 @@ $cred = Get-StoredCredential -Target "ShopfloorAdmin"
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Advantages:**
|
**Advantages:**
|
||||||
- ✅ Works with scheduled tasks
|
- Works with scheduled tasks
|
||||||
- ✅ Can be used by service accounts
|
- Can be used by service accounts
|
||||||
- ✅ Centralized management
|
- Centralized management
|
||||||
- ✅ Encrypted by Windows
|
- Encrypted by Windows
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@ $env:WINRM_CERT_PATH = "C:\Certs\wildcard.pfx"
|
|||||||
-Domain $env:WINRM_DOMAIN
|
-Domain $env:WINRM_DOMAIN
|
||||||
```
|
```
|
||||||
|
|
||||||
**⚠️ Do NOT use for passwords:**
|
** Do NOT use for passwords:**
|
||||||
```powershell
|
```powershell
|
||||||
# BAD - Environment variables are not secure for passwords
|
# BAD - Environment variables are not secure for passwords
|
||||||
$env:CERT_PASSWORD = "MyPassword" # DON'T DO THIS
|
$env:CERT_PASSWORD = "MyPassword" # DON'T DO THIS
|
||||||
@@ -350,7 +350,7 @@ $cred = Get-StoredCredential -Target "ShopfloorAdmin"
|
|||||||
|
|
||||||
## 🛡️ Security Best Practices
|
## 🛡️ Security Best Practices
|
||||||
|
|
||||||
### Do's ✅
|
### Do's
|
||||||
|
|
||||||
1. **Always use SecureString for passwords**
|
1. **Always use SecureString for passwords**
|
||||||
```powershell
|
```powershell
|
||||||
@@ -386,7 +386,7 @@ $cred = Get-StoredCredential -Target "ShopfloorAdmin"
|
|||||||
[System.GC]::Collect()
|
[System.GC]::Collect()
|
||||||
```
|
```
|
||||||
|
|
||||||
### Don'ts ❌
|
### Don'ts
|
||||||
|
|
||||||
1. **Never hardcode passwords**
|
1. **Never hardcode passwords**
|
||||||
```powershell
|
```powershell
|
||||||
@@ -420,7 +420,7 @@ $cred = Get-StoredCredential -Target "ShopfloorAdmin"
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🔧 Setting Up Secure Credential Storage
|
## Setting Up Secure Credential Storage
|
||||||
|
|
||||||
### Step 1: Create Secure Directory
|
### Step 1: Create Secure Directory
|
||||||
|
|
||||||
@@ -543,15 +543,15 @@ $cred = Get-DomainCredential
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📊 Summary Comparison
|
## Summary Comparison
|
||||||
|
|
||||||
| Method | Security | Ease of Use | Automation | Cross-User | Enterprise |
|
| Method | Security | Ease of Use | Automation | Cross-User | Enterprise |
|
||||||
|--------|----------|-------------|------------|------------|------------|
|
|--------|----------|-------------|------------|------------|------------|
|
||||||
| Interactive Prompt | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ❌ | ❌ | ❌ |
|
| Interactive Prompt | | | | | |
|
||||||
| Encrypted File | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ✅ | ❌ | ❌ |
|
| Encrypted File | | | | | |
|
||||||
| Credential Manager | ⭐⭐⭐⭐ | ⭐⭐⭐ | ✅ | ✅ | ⭐⭐⭐ |
|
| Credential Manager | | | | | |
|
||||||
| Azure Key Vault | ⭐⭐⭐⭐⭐ | ⭐⭐ | ✅ | ✅ | ⭐⭐⭐⭐⭐ |
|
| Azure Key Vault | | | | | |
|
||||||
| Plaintext (DON'T) | ⭐ | ⭐⭐⭐⭐⭐ | ✅ | ✅ | ❌ |
|
| Plaintext (DON'T) | | | | | |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -503,13 +503,13 @@ Remove-PSSession $session
|
|||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
1. ✅ Run the updated deployment on test PC (with wildcard CN fix)
|
1. Run the updated deployment on test PC (with wildcard CN fix)
|
||||||
2. ✅ Use these commands to test connectivity
|
2. Use these commands to test connectivity
|
||||||
3. ✅ Verify remote commands work correctly
|
3. Verify remote commands work correctly
|
||||||
4. ✅ If successful, deploy to 3-5 more PCs
|
4. If successful, deploy to 3-5 more PCs
|
||||||
5. ✅ Test connectivity to all deployed PCs
|
5. Test connectivity to all deployed PCs
|
||||||
6. ✅ Document any issues in deployment logs
|
6. Document any issues in deployment logs
|
||||||
7. ✅ Proceed with production rollout
|
7. Proceed with production rollout
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ If the above methods don't work, generate the certificate on a computer without
|
|||||||
**Solution:**
|
**Solution:**
|
||||||
```powershell
|
```powershell
|
||||||
# Run PowerShell as Administrator
|
# Run PowerShell as Administrator
|
||||||
# Right-click PowerShell → Run as Administrator
|
# Right-click PowerShell Run as Administrator
|
||||||
|
|
||||||
# Verify admin rights
|
# Verify admin rights
|
||||||
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
|
||||||
@@ -413,11 +413,11 @@ If none of these solutions work:
|
|||||||
|
|
||||||
**Recommended approach when you see smart card error:**
|
**Recommended approach when you see smart card error:**
|
||||||
|
|
||||||
1. ✅ Try `Generate-WildcardCert-Alternative.ps1` (uses certreq)
|
1. Try `Generate-WildcardCert-Alternative.ps1` (uses certreq)
|
||||||
2. ✅ Try disabling smart card service temporarily
|
2. Try disabling smart card service temporarily
|
||||||
3. ✅ Try different crypto provider
|
3. Try different crypto provider
|
||||||
4. ✅ Generate on different computer without restrictions
|
4. Generate on different computer without restrictions
|
||||||
5. ✅ Request certificate from your organization's CA
|
5. Request certificate from your organization's CA
|
||||||
|
|
||||||
**For production deployment:**
|
**For production deployment:**
|
||||||
- Always get certificates from trusted Certificate Authority
|
- Always get certificates from trusted Certificate Authority
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ New-SmbShare -Name "WinRM-HTTPS" -Path $deployPath -FullAccess "Everyone"
|
|||||||
**Or manually:**
|
**Or manually:**
|
||||||
1. Create folder: `C:\Deployment\WinRM-HTTPS`
|
1. Create folder: `C:\Deployment\WinRM-HTTPS`
|
||||||
2. Copy all files from `winrm-https` folder
|
2. Copy all files from `winrm-https` folder
|
||||||
3. Right-click folder → Properties → Sharing → Advanced Sharing
|
3. Right-click folder Properties Sharing Advanced Sharing
|
||||||
4. Check "Share this folder"
|
4. Check "Share this folder"
|
||||||
5. Share name: `WinRM-HTTPS`
|
5. Share name: `WinRM-HTTPS`
|
||||||
6. Permissions: Give "Everyone" Read access (or specific security group)
|
6. Permissions: Give "Everyone" Read access (or specific security group)
|
||||||
@@ -49,10 +49,10 @@ Get-ChildItem "\\SERVER\WinRM-HTTPS"
|
|||||||
```
|
```
|
||||||
|
|
||||||
Expected files:
|
Expected files:
|
||||||
- ✅ `Deploy-WinRM-HTTPS.bat`
|
- `Deploy-WinRM-HTTPS.bat`
|
||||||
- ✅ `Setup-WinRM-HTTPS.ps1`
|
- `Setup-WinRM-HTTPS.ps1`
|
||||||
- ✅ `wildcard-logon-ds-ge-com-20251017.pfx`
|
- `wildcard-logon-ds-ge-com-20251017.pfx`
|
||||||
- ✅ Other PS1 scripts
|
- Other PS1 scripts
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -105,13 +105,13 @@ Include everything for troubleshooting:
|
|||||||
6. Wait for completion
|
6. Wait for completion
|
||||||
|
|
||||||
**Advantages:**
|
**Advantages:**
|
||||||
- ✅ Simple - no copying needed
|
- Simple - no copying needed
|
||||||
- ✅ Always uses latest files
|
- Always uses latest files
|
||||||
- ✅ No local disk space used
|
- No local disk space used
|
||||||
|
|
||||||
**Disadvantages:**
|
**Disadvantages:**
|
||||||
- ⚠️ Requires network connectivity during install
|
- Requires network connectivity during install
|
||||||
- ⚠️ Slower if network is congested
|
- Slower if network is congested
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -139,13 +139,13 @@ Deploy-WinRM-HTTPS.bat
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Advantages:**
|
**Advantages:**
|
||||||
- ✅ Faster execution
|
- Faster execution
|
||||||
- ✅ Works if network connection lost
|
- Works if network connection lost
|
||||||
- ✅ Can verify files before running
|
- Can verify files before running
|
||||||
|
|
||||||
**Disadvantages:**
|
**Disadvantages:**
|
||||||
- ⚠️ Uses local disk space
|
- Uses local disk space
|
||||||
- ⚠️ Extra copy step
|
- Extra copy step
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -193,14 +193,14 @@ foreach ($hostname in $targetPCs) {
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Advantages:**
|
**Advantages:**
|
||||||
- ✅ Deploy to many PCs from one location
|
- Deploy to many PCs from one location
|
||||||
- ✅ No physical access needed
|
- No physical access needed
|
||||||
- ✅ Can run overnight/batch
|
- Can run overnight/batch
|
||||||
|
|
||||||
**Disadvantages:**
|
**Disadvantages:**
|
||||||
- ⚠️ Requires existing remote access (WinRM or admin shares)
|
- Requires existing remote access (WinRM or admin shares)
|
||||||
- ⚠️ More complex
|
- More complex
|
||||||
- ⚠️ Password visible in script (use secure credential management)
|
- Password visible in script (use secure credential management)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -219,8 +219,8 @@ foreach ($hostname in $targetPCs) {
|
|||||||
- Edit GPO
|
- Edit GPO
|
||||||
|
|
||||||
3. **Add Startup Script:**
|
3. **Add Startup Script:**
|
||||||
- Computer Configuration → Policies → Windows Settings → Scripts
|
- Computer Configuration Policies Windows Settings Scripts
|
||||||
- Startup → Add
|
- Startup Add
|
||||||
- Script: `\\DOMAIN\NETLOGON\Scripts\WinRM-HTTPS\Deploy-WinRM-HTTPS.bat`
|
- Script: `\\DOMAIN\NETLOGON\Scripts\WinRM-HTTPS\Deploy-WinRM-HTTPS.bat`
|
||||||
|
|
||||||
4. **Link GPO to OU:**
|
4. **Link GPO to OU:**
|
||||||
@@ -228,14 +228,14 @@ foreach ($hostname in $targetPCs) {
|
|||||||
- PCs will run script on next reboot
|
- PCs will run script on next reboot
|
||||||
|
|
||||||
**Advantages:**
|
**Advantages:**
|
||||||
- ✅ Automated deployment
|
- Automated deployment
|
||||||
- ✅ Centrally managed
|
- Centrally managed
|
||||||
- ✅ Runs with SYSTEM privileges
|
- Runs with SYSTEM privileges
|
||||||
|
|
||||||
**Disadvantages:**
|
**Disadvantages:**
|
||||||
- ⚠️ Requires domain environment
|
- Requires domain environment
|
||||||
- ⚠️ Requires restart
|
- Requires restart
|
||||||
- ⚠️ Password handling more complex
|
- Password handling more complex
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ REM Set on each PC or via GPO
|
|||||||
setx WINRM_CERT_PASS "XqHuyaLZSyCYEcpsMz6h5" /M
|
setx WINRM_CERT_PASS "XqHuyaLZSyCYEcpsMz6h5" /M
|
||||||
```
|
```
|
||||||
|
|
||||||
**⚠️ Never:**
|
** Never:**
|
||||||
- Hardcode password in batch file on network share (readable by everyone)
|
- Hardcode password in batch file on network share (readable by everyone)
|
||||||
- Email password in plaintext
|
- Email password in plaintext
|
||||||
- Store password in unencrypted text file
|
- Store password in unencrypted text file
|
||||||
@@ -293,7 +293,7 @@ Grant-SmbShareAccess -Name "WinRM-HTTPS" -AccountName "DOMAIN\IT Admins" -Access
|
|||||||
The certificate PFX file contains the private key. Protect it:
|
The certificate PFX file contains the private key. Protect it:
|
||||||
|
|
||||||
1. **Use share permissions** to restrict access
|
1. **Use share permissions** to restrict access
|
||||||
2. **Use certificate password** (you did ✅)
|
2. **Use certificate password** (you did )
|
||||||
3. **Monitor access** to the share
|
3. **Monitor access** to the share
|
||||||
4. **Delete from share** after deployment complete
|
4. **Delete from share** after deployment complete
|
||||||
|
|
||||||
@@ -315,7 +315,7 @@ The certificate PFX file contains the private key. Protect it:
|
|||||||
```
|
```
|
||||||
For each test PC:
|
For each test PC:
|
||||||
1. Navigate to \\SERVER\WinRM-HTTPS
|
1. Navigate to \\SERVER\WinRM-HTTPS
|
||||||
2. Right-click Deploy-WinRM-HTTPS.bat → Run as Administrator
|
2. Right-click Deploy-WinRM-HTTPS.bat Run as Administrator
|
||||||
3. Enter password when prompted
|
3. Enter password when prompted
|
||||||
4. Verify success
|
4. Verify success
|
||||||
5. Test connection from management server
|
5. Test connection from management server
|
||||||
@@ -378,7 +378,7 @@ Write-Host "Share created: \\$env:COMPUTERNAME\WinRM-HTTPS"
|
|||||||
|
|
||||||
**On test PC (G1JJVH63ESF):**
|
**On test PC (G1JJVH63ESF):**
|
||||||
1. Open Explorer: `\\MANAGEMENT-SERVER\WinRM-HTTPS`
|
1. Open Explorer: `\\MANAGEMENT-SERVER\WinRM-HTTPS`
|
||||||
2. Right-click `Deploy-WinRM-HTTPS.bat` → Run as Administrator
|
2. Right-click `Deploy-WinRM-HTTPS.bat` Run as Administrator
|
||||||
3. Enter password: `XqHuyaLZSyCYEcpsMz6h5`
|
3. Enter password: `XqHuyaLZSyCYEcpsMz6h5`
|
||||||
4. Wait for completion
|
4. Wait for completion
|
||||||
|
|
||||||
@@ -462,7 +462,7 @@ Get-SmbShareAccess -Name "WinRM-HTTPS"
|
|||||||
### Problem: "Access Denied" running batch file
|
### Problem: "Access Denied" running batch file
|
||||||
|
|
||||||
**Solution:**
|
**Solution:**
|
||||||
- Right-click → Run as Administrator
|
- Right-click Run as Administrator
|
||||||
- User must be local admin on PC
|
- User must be local admin on PC
|
||||||
- Check UAC settings
|
- Check UAC settings
|
||||||
|
|
||||||
@@ -514,15 +514,15 @@ Save as `README.txt` in the share.
|
|||||||
|
|
||||||
**Best Practice for Your Scenario:**
|
**Best Practice for Your Scenario:**
|
||||||
|
|
||||||
1. ✅ Create network share: `\\SERVER\WinRM-HTTPS`
|
1. Create network share: `\\SERVER\WinRM-HTTPS`
|
||||||
2. ✅ Include:
|
2. Include:
|
||||||
- `Deploy-WinRM-HTTPS.bat`
|
- `Deploy-WinRM-HTTPS.bat`
|
||||||
- `Setup-WinRM-HTTPS.ps1`
|
- `Setup-WinRM-HTTPS.ps1`
|
||||||
- `wildcard-logon-ds-ge-com-20251017.pfx`
|
- `wildcard-logon-ds-ge-com-20251017.pfx`
|
||||||
3. ✅ Deploy to 3-5 test PCs manually
|
3. Deploy to 3-5 test PCs manually
|
||||||
4. ✅ Verify each deployment
|
4. Verify each deployment
|
||||||
5. ✅ Deploy to remaining PCs in batches
|
5. Deploy to remaining PCs in batches
|
||||||
6. ✅ Remove certificate from share when done
|
6. Remove certificate from share when done
|
||||||
|
|
||||||
**Certificate Password Storage:**
|
**Certificate Password Storage:**
|
||||||
- Store in password manager
|
- Store in password manager
|
||||||
@@ -530,7 +530,7 @@ Save as `README.txt` in the share.
|
|||||||
- Use encrypted files for automation
|
- Use encrypted files for automation
|
||||||
|
|
||||||
**The batch files handle:**
|
**The batch files handle:**
|
||||||
- ✅ Administrator check
|
- Administrator check
|
||||||
- ✅ File verification
|
- File verification
|
||||||
- ✅ Error handling
|
- Error handling
|
||||||
- ✅ User feedback
|
- User feedback
|
||||||
|
|||||||
@@ -503,13 +503,13 @@ Remove-PSSession $session
|
|||||||
|
|
||||||
## Next Steps
|
## Next Steps
|
||||||
|
|
||||||
1. ✅ Run the updated deployment on test PC (with wildcard CN fix)
|
1. Run the updated deployment on test PC (with wildcard CN fix)
|
||||||
2. ✅ Use these commands to test connectivity
|
2. Use these commands to test connectivity
|
||||||
3. ✅ Verify remote commands work correctly
|
3. Verify remote commands work correctly
|
||||||
4. ✅ If successful, deploy to 3-5 more PCs
|
4. If successful, deploy to 3-5 more PCs
|
||||||
5. ✅ Test connectivity to all deployed PCs
|
5. Test connectivity to all deployed PCs
|
||||||
6. ✅ Document any issues in deployment logs
|
6. Document any issues in deployment logs
|
||||||
7. ✅ Proceed with production rollout
|
7. Proceed with production rollout
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user