-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JumpCloud PowerShell Module v2.7.0 #505
Conversation
….com/TheJumpCloud/support into SA-3176_ImportRegFilesRegistryPolicy
…JumpCloud/support into SA-3176_ImportRegFilesRegistryPolicy
…tryPolicy SA-3176: New/Set-JCPolicy Import Reg Files
} | ||
} | ||
} | ||
} | ||
} | ||
end { | ||
if ($totalCountHeader) { | ||
if ($parallel -and $totalCountHeader) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import REG Tests:
Import Test With Just One registry .reg Item ✅
Import Test with Multiple registry .reg items ✅
Set Test without -RegistryOverwrite param ✅ policy is appended
Set Test with -RegistryOverwrite param ✅ policy is overwritten
Setting a policy where a policy has the same name as another policy does throw an error as expected.
Finally I can confirm that these changes do address the bug in the older version of PWSH:
Issues
What does this solve?
This feature will allow admins to upload
.reg
files into new or existingWindows - Advanced: Custom Registry Keys Policy
JumpCloud Policies to deploy to their Windows machines.This also resolves a bug where
Get-JCResults
was not adding all indexes of an object to the parent array as expected and was instead adding a single instance to the array containing all objects which was causing issues with counts and object manipulationIs there anything particularly tricky?
Currently,
Windows - Advanced: Custom Registry Keys Policy
only accepts registry keys that belong in the HKEY_LOCAL_MACHINE (HKLM) hive. If a .reg file is attempted to be uploaded that contains a non-HKLM key, it will not be valid.How should this be tested?
Registry File Work
Download the sample .reg file and unzip
i. SampleRegFile.reg.zip
Run the following function:
ii.
New-JCPolicy -TemplateName windows_Advanced:_Custom_Registry_Keys -Name "Test - Registry File Upload" -registryFile "/path/to/SampleRegFile.reg"
Validate that the "Test - Registry File Upload" Policy was successfully created and contains the expected registry values
Run the following function:
iv.
Set-JCPolicy -PolicyName "Test - Registry File Upload" -registryFile "/path/to/SampleRegFile.reg"
Validate that the "Test - Registry File Upload" Policy now has 10 values instead of the original 5
Run the following function to replace the existing values of the policy with just the values from the SampleRegFile:
iv.
Set-JCPolicy -PolicyName "Test - Registry File Upload" -registryFile "/path/to/SampleRegFile.reg" -registryOverwrite
Validate that the "Test - Registry File Upload" Policy now has the 5 values from the file
Get-JCResults Work
5.1.19041.2673