Three final optimization batches: 1. Start-Transcript added to 4 scripts that lacked standalone logging: 04-NetworkAndWinRM.ps1, 05-OfficeShortcuts.ps1, 01-eDNC.ps1, 02-MachineNumberACLs.ps1. Each writes to C:\Logs\SFLD\<name>.log with append mode. Stop-Transcript added before exit points. 2. preinstall.json: Oracle Client PCTypes changed from ["*"] to ["Standard", "CMM", "Genspect", "Keyence", "WaxAndTrace", "Display"]. Lab Workstations don't need Oracle Client (shopfloor data app dependency). VC++ redists stay at ["*"] (harmless shared deps). 3. Edge profiles added to all remaining PC types in site-config.json: CMM, Genspect, Keyence, WaxAndTrace, Standard-Timeclock all get the standard 3-tab setup (Plant Apps + Homepage + Dashboard) with homepage = tsgwp00524. Display-Lobby and Display-Dashboard get Shopfloor Dashboard as both homepage and single tab. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
16 lines
708 B
PowerShell
16 lines
708 B
PowerShell
# 04-NetworkAndWinRM.ps1 — Set network profiles to Private and enable WinRM (baseline)
|
|
|
|
# --- Transcript ---
|
|
$logDir = 'C:\Logs\SFLD'
|
|
if (-not (Test-Path $logDir)) { try { New-Item -ItemType Directory -Path $logDir -Force | Out-Null } catch {} }
|
|
try { Start-Transcript -Path (Join-Path $logDir '04-NetworkAndWinRM.log') -Append -Force | Out-Null } catch {}
|
|
|
|
# --- Set all network profiles to Private ---
|
|
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
|
|
Write-Host "All network profiles set to Private."
|
|
|
|
# --- Enable and configure WinRM ---
|
|
Enable-PSRemoting -Force -SkipNetworkProfileCheck
|
|
Write-Host "WinRM enabled."
|
|
try { Stop-Transcript | Out-Null } catch {}
|