Files
Samsara/powershell/Get-ServerRoles.ps1
oceans2alaska 610a3bb447 Privacy hardening, remote-peer IP masking and review fixes
- Add privacy projection (core/privacy.py), private report storage, bounded
  process capture; omit identities, free text and unapproved paths
- Mask remote peer IPs: only loopback/host/wildcard stay numeric, others are
  reduced to remote_scope private/public (schema + scoring updated)
- Map ss TCP states to canonical names; ASCII-only numeric fields; fix
  "Microsoft Visual C++" product matching (Python and PowerShell)
- Merge 7fed3b9: -Diagnostic switch, serialization exit code 3, PS7 module
  path, UI error detail; keep hardened task/certificate collectors
- Add audit docs, privacy docs and regression tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 18:50:24 -08:00

13 lines
609 B
PowerShell

function Get-SamsaraRoles {
param($Result)
Invoke-SamsaraRead $Result 'Server roles and features' {
$index = 0
$Result.data = @(Get-WindowsFeature -ErrorAction Stop | Where-Object { $_.Installed } | ForEach-Object {
$index++
[pscustomobject]@{ name = Get-SamsaraPublicName 'roles' ([string]$_.Name) $index
state = [string]$_.InstallState; feature_type = [string]$_.FeatureType }
})
}
$Result.limitations += 'Installed roles/features only; installed state does not prove current use. Requires local ServerManager availability.'
}