Lab Workstation: profile-aware Edge homepage + startup tabs

Lab profile in site-config.json now has:
  edgeHomepage: http://tsgwp00524.logon.ds.ge.com/
  edgeStartupTabs: WJ Shop Floor Homepage, M365 Webmail, Shopfloor Dashboard

08-EdgeDefaultBrowser.ps1 now resolves edge config from:
  pcProfile.edgeStartupTabs > siteConfig.edgeStartupTabs > hardcoded
  pcProfile.edgeHomepage > first startup tab (existing behavior)

This lets different PC types have different Edge configs:
  Standard-Machine: Plant Apps + Homepage + Dashboard (homepage = Plant Apps)
  Lab: Homepage + Webmail + Dashboard (homepage = tsgwp00524)

Added webmail URL to site-config.json urls section:
  "webmail": "https://outlook.office365.us/mail"

Lab gets no OpenText/UDC/eDNC — already filtered:
  OpenText + UDC: PCTypes = ["Standard"] in preinstall.json
  eDNC: Standard/01-eDNC.ps1 (type-specific, never runs for Lab)
  Office: from PPKG (shared across all shopfloor types)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-04-10 11:49:43 -04:00
parent 7c8eb6899d
commit ed3bfc8234
2 changed files with 27 additions and 8 deletions

View File

@@ -196,11 +196,17 @@ function Resolve-StartupUrl {
return $null return $null
} }
# Tab order as requested: Plant Apps, Shop Floor Homepage, Shopfloor Dashboard # Resolve startup tabs: profile > site-wide > hardcoded fallback
# Different PC types can have different tabs (e.g. Lab has Webmail
# instead of Plant Apps, Standard-Machine has Plant Apps).
$cfgTabs = if ($pcProfile -and $pcProfile.edgeStartupTabs) { $pcProfile.edgeStartupTabs }
elseif ($siteConfig -and $siteConfig.edgeStartupTabs) { $siteConfig.edgeStartupTabs }
else { $null }
$startupTabs = @() $startupTabs = @()
if ($siteConfig -and $siteConfig.edgeStartupTabs) { if ($cfgTabs) {
foreach ($tab in $siteConfig.edgeStartupTabs) { foreach ($tab in $cfgTabs) {
$fallback = if ($tab.fallbackUrlKey -and $siteConfig.urls) { $siteConfig.urls.$($tab.fallbackUrlKey) } else { '' } $fallback = if ($tab.fallbackUrlKey -and $siteConfig.urls) { $siteConfig.urls.$($tab.fallbackUrlKey) } else { '' }
$url = Resolve-StartupUrl -BaseName $tab.baseName -Fallback $fallback $url = Resolve-StartupUrl -BaseName $tab.baseName -Fallback $fallback
if ($url) { $startupTabs += $url } if ($url) { $startupTabs += $url }
@@ -216,6 +222,10 @@ if ($siteConfig -and $siteConfig.edgeStartupTabs) {
if ($dashboard) { $startupTabs += $dashboard } if ($dashboard) { $startupTabs += $dashboard }
} }
# Resolve homepage: profile can override (e.g. Lab has a different homepage
# than Standard). Falls back to the first startup tab if not specified.
$edgeHomepage = if ($pcProfile -and $pcProfile.edgeHomepage) { $pcProfile.edgeHomepage } else { $null }
if ($startupTabs.Count -eq 0) { if ($startupTabs.Count -eq 0) {
Write-Warning "No startup tab URLs resolved - skipping Edge startup config." Write-Warning "No startup tab URLs resolved - skipping Edge startup config."
} else { } else {
@@ -241,8 +251,10 @@ if ($startupTabs.Count -eq 0) {
Set-ItemProperty -Path $urlsKey -Name $name -Value $startupTabs[$i] -Type String -Force Set-ItemProperty -Path $urlsKey -Name $name -Value $startupTabs[$i] -Type String -Force
} }
# Homepage = the first startup tab. Home button opens it, not NTP. # Homepage: profile override > first startup tab. Home button opens it, not NTP.
Set-ItemProperty -Path $edgePolKey -Name 'HomepageLocation' -Value $startupTabs[0] -Type String -Force $homepageUrl = if ($edgeHomepage) { $edgeHomepage } else { $startupTabs[0] }
Write-Host "Homepage set to: $homepageUrl"
Set-ItemProperty -Path $edgePolKey -Name 'HomepageLocation' -Value $homepageUrl -Type String -Force
Set-ItemProperty -Path $edgePolKey -Name 'HomepageIsNewTabPage' -Value 0 -Type DWord -Force Set-ItemProperty -Path $edgePolKey -Name 'HomepageIsNewTabPage' -Value 0 -Type DWord -Force
Set-ItemProperty -Path $edgePolKey -Name 'ShowHomeButton' -Value 1 -Type DWord -Force Set-ItemProperty -Path $edgePolKey -Name 'ShowHomeButton' -Value 1 -Type DWord -Force

View File

@@ -9,7 +9,8 @@
"urls": { "urls": {
"plantApps": "https://mes-wjefferson.apps.lr.geaerospace.net/run/?app_name=Plant%20Applications", "plantApps": "https://mes-wjefferson.apps.lr.geaerospace.net/run/?app_name=Plant%20Applications",
"shopFloorHomepage": "http://tsgwp00524.logon.ds.ge.com/", "shopFloorHomepage": "http://tsgwp00524.logon.ds.ge.com/",
"shopfloorDashboard": "https://tsgwp00525.wjs.geaerospace.net/shopdb/shopfloor-dashboard/" "shopfloorDashboard": "https://tsgwp00525.wjs.geaerospace.net/shopdb/shopfloor-dashboard/",
"webmail": "https://outlook.office365.us/mail"
}, },
"edgeStartupTabs": [ "edgeStartupTabs": [
@@ -147,12 +148,18 @@
}, },
"Lab": { "Lab": {
"_comment": "No applications, minimal startup", "_comment": "Lab Workstation - Office from ppkg, web URLs, custom Edge homepage + tabs",
"startupItems": [], "startupItems": [],
"taskbarPins": [ "taskbarPins": [
{ "name": "Microsoft Edge", "lnkPath": "%ALLUSERSPROFILE%\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Edge.lnk" } { "name": "Microsoft Edge", "lnkPath": "%ALLUSERSPROFILE%\\Microsoft\\Windows\\Start Menu\\Programs\\Microsoft Edge.lnk" }
], ],
"desktopApps": [] "desktopApps": [],
"edgeHomepage": "http://tsgwp00524.logon.ds.ge.com/",
"edgeStartupTabs": [
{ "baseName": "WJ Shop Floor Homepage", "fallbackUrlKey": "shopFloorHomepage" },
{ "baseName": "M365 Webmail", "fallbackUrlKey": "webmail" },
{ "baseName": "Shopfloor Dashboard", "fallbackUrlKey": "shopfloorDashboard" }
]
}, },
"Display-Lobby": { "Display-Lobby": {