Cut 5114 reg import update data type#739
Merged
Merged
Conversation
…heJumpCloud/support into CUT-5114_regImportUpdateDataType
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit d19bd23. Configure here.
junioralmeida-82
approved these changes
May 7, 2026
Contributor
junioralmeida-82
left a comment
There was a problem hiding this comment.
Approved. Verified the 4 files changed and they correctly address the alias fixes and documentation updates for the v3.1.0 release. Great work on the rebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Issues
What does this solve?
This release addresses an issue with the JumpCloud Registry Policy for Windows devices. Previously when creating a new policy from a registry .reg file, the New-JCPolicy function would call our private function
Convert-RegToPSObject.ps1and in doing so would importinttype DWORDS asinttype values. This change explicitly casts these values asstringtype values.When these fields were cast as
inttypes, the JumpCloud Agent would fail to apply the policy based on it's own validation of the registry entry. Now when creating policies DWORD type values are cast as strings regardless of their type and they are able to successfully deployed to devices.Is there anything particularly tricky?
N/A
How should this be tested?
Save this file as a .reg file somewhere on your desktop:
Using the latest production version of the JumpCloud PowerShell Module, create a new policy using this .reg file and
New-JCPolicyNew-JCPolicy -TemplateName windows_Advanced:_Custom_Registry_Keys -RegistryFile "~/Documents/registry.reg" -Name "(Testing) Windows Firewall Policy"This should create a new policy in JumpCloud, assign this policy to a windows device, it should fail.
Error on JumpCloud Console:

Error on

jcagent.logIn a new PWSH session, import the development version of the PowerShell module:
Import-Module "~/Documents/GitHub/support/PowerShell/JumpCloud Module/JumpCloud.psd1" -forceCreate the policy from the same file using a different name:
New-JCPolicy -TemplateName windows_Advanced:_Custom_Registry_Keys -RegistryFile "~/Documents/registry.reg" -Name "(Testing) Windows Firewall Policy -latest"Apply that policy to the same device, it should now apply correctly:

Screenshots
In previous versions of

Convert-RegToPSObject.ps1some registry values would fail to apply and show this error in thejcagent.logfile:Note
Medium Risk
Changes the registry
.regimport serialization forNew-JCPolicy/Set-JCPolicy, which can affect how Windows registry policies are applied and may alter existing expectations around numeric types/edge cases (e.g., zero and 64-bit ranges). Test updates reduce regression risk but behavior changes are user-visible.Overview
Fixes Windows custom registry policy creation from
.regfiles by changingConvert-RegToPSObjectto emit DWORD and QWORD values as decimal strings (usinguint32/uint64parsing) instead of PowerShell integers, and adds safer handling for all-zero QWORD inputs.Updates the Pester tests to assert the new string-typed
customDatafor DWORD/QWORD, and refreshes the module manifest/changelog release dates to reflect the cut.Reviewed by Cursor Bugbot for commit 5995a87. Bugbot is set up for automated code reviews on this repo. Configure here.