nordlo.partille.cblifecycle 0.3.0
Handles creation, updates and deletion of computer objects representing chromebooks in Active Directory
No packages depend on nordlo.partille.cblifecycle.
First production-ready release. Wraps the full Chrome OS → Active Directory lifecycle and ships a Task Scheduler orchestration wrapper.
Added
Get-GoogleChromeDevice— fetches Chrome devices from the Google Workspace Directory API and writes JSON via-OutputJsonPath.-Limit,-OrgUnitPath,-MaxRetries/-RetryIntervalSec(PowerShell 7 built-in 429/5xx retry, honours serverRetry-After).Invoke-PKChromebookPreprovision— pre-creates AD computer accounts from a watched folder of serial-number lists (.txt/.lst/.csv). Tags accounts with a-DescriptionMarkerPrefixthat the lifecycle deletion pass respects; the marker self-clears the next time the device shows up asACTIVE.examples/Run-ChromebookProvisioning.ps1— orchestration wrapper for a Task Scheduler tick. Fetch → preprovision → lifecycle, mail on OK↔ERROR transitions, file-based single-instance lock, abnormal-termination detection, retention pruning, log rotation, mass-deletion safety threshold (-DeletionSafetyLimit, override with-ForceDelete).- Lifecycle: status-driven disable / re-enable (CSV
statuscolumn), atomic creation viaNew-ADComputer -OtherAttributes, SPN registration (host/<serial>andhost/<serial>.<DnsDomain>),-OrgUnitGroupMap(regex → group, reconciled),-MemberOf(add-only),-Server,-SamAccountPrefix. - Templating:
-DescriptionTemplate,-InfoTemplate, and-AttributeMapaccept PowerShell-style paths ({name.sub},{arr[0]}) and a:datetransform for epoch-ms fields. Derived{school}/{class}/{student}for the common case. Unknown root segments throw at startup; always-empty paths log a WARNING.
Changed (breaking)
- Account matching is by
-MatchAttribute(defaultserialNumber). SAM names are now randomCB-<11 hex>; the serial lives only in the matching attribute.DNSHostNameis built from<serial>.<DnsDomain>so RADIUS/NPS authenticates against the right name. - Google → lifecycle exchange is JSON, not CSV.
-OutputCsvPath→-OutputJsonPath;Invoke-PKChromebookLifecycle -CsvPath→-DataPath. Nested fields likerecentUsersare preserved. - CSV gating column is
status=ACTIVE(wasprovisionStatus=PROVISIONED) to match the real Google Admin Console export schema. Get-GoogleChromeDevicesrenamed toGet-GoogleChromeDevice(singular, per PowerShell conventions).- Default
-AttributeMapmapsorgUnitPath→ou(wasextensionAttribute4).
Changed
- Event Log writes use
[System.Diagnostics.EventLog]::WriteEntry(...); PS 7 droppedWrite-EventLog.EventLogNameparameter removed fromWrite-CbLog. - Introduced
GitVersion.ymland upgraded the module scaffold (build pipeline, VS Code tasks, PSScriptAnalyzer settings).
Fixed
- AD-modifying cmdlets pass
-Confirm:$false, so the lifecycle no longer prompts (and deadlocks under Task Scheduler) underConfirmImpact = 'High'. The wrapper also splatsConfirm = $falseon the function calls themselves. -AttributeMapdiff handles multi-valued AD attributes (e.g.ou,serialNumber); an emptyADPropertyValueCollectionis no longer treated as "no change".- SPN add loops one value per
Set-ADComputercall — eachAddvalue validates as a single string, not an array. - Sparse Google fields no longer hard-fail templating. Paths that resolve to empty on every device log event 1003 (WARNING) instead of throwing.
- Log writes (
Write-CbLog, run summary) emit under-WhatIfso the audit trail is preserved on dry runs. Import-Module ActiveDirectoryno longer leaksWhat if:noise from implicit-remoting proxy-copy files.
Migration
- TameMyCerts / NPS: point
DirectoryServicesAttributeatserialNumber(or your chosen-MatchAttribute). - Legacy accounts (no value in
-MatchAttribute) are detected at event 1102, skipped for creation, and removed by the deletion pass. Run-EnableDeletiononce (add-ForceDeleteif over the safety threshold), then a normal run to recreate asCB-<hex>. Dry-run with-WhatIf -EnableDeletionfirst to count legacy accounts.
This package has no dependencies.
| Version | Downloads | Last updated |
|---|---|---|
| 0.5.0-rc.1 | 2 | 07/01/2026 |
| 0.4.0-rc.3 | 2 | 07/01/2026 |
| 0.4.0-rc.2 | 1 | 07/01/2026 |
| 0.4.0-rc.1 | 2 | 07/01/2026 |
| 0.3.0 | 1 | 06/25/2026 |
| 0.3.0-rc.21 | 1 | 07/01/2026 |
| 0.3.0-rc.20 | 1 | 06/23/2026 |
| 0.3.0-rc.19 | 1 | 06/23/2026 |
| 0.3.0-rc.18 | 2 | 06/22/2026 |
| 0.3.0-rc.17 | 2 | 06/17/2026 |
| 0.3.0-rc.16 | 8 | 06/17/2026 |
| 0.3.0-rc.15 | 2 | 06/17/2026 |
| 0.3.0-rc.14 | 1 | 06/17/2026 |
| 0.3.0-rc.13 | 2 | 06/17/2026 |
| 0.3.0-rc.12 | 2 | 06/17/2026 |
| 0.3.0-rc.11 | 3 | 06/17/2026 |
| 0.3.0-rc.10 | 2 | 06/17/2026 |
| 0.3.0-rc.9 | 1 | 06/16/2026 |
| 0.3.0-rc.8 | 1 | 06/16/2026 |
| 0.3.0-rc.7 | 2 | 06/12/2026 |
| 0.3.0-rc.6 | 8 | 06/09/2026 |