Skip to content

JumpCloudModule v2.18 (Re-release)#672

Merged
kmaranionjc merged 60 commits into
masterfrom
JumpCloudModule_2.18
Apr 21, 2025
Merged

JumpCloudModule v2.18 (Re-release)#672
kmaranionjc merged 60 commits into
masterfrom
JumpCloudModule_2.18

Conversation

@kmaranionjc
Copy link
Copy Markdown
Contributor

Issues

  • CUT-4565 - CUT-4565-Windows-Custom-Policy-Support

What does this solve?

The New/Set/Get-JCPolicy cmdlets now support the management of Windows - Custom MDM (OMA-URI) Policy. Multiple OMA-URI configurations can be specified using the -uriList parameter, for instance:
-uriList (@( @{format = "int"; uri = "a"; value = "5" }, @{format = "boolean"; uri = "b"; value = "true" } ))

Furthermore, administrators can edit, add, or remove individual OMA-URI settings within existing custom MDM policies.

Is there anything particularly tricky?

m/a

How should this be tested?

First, run these commands to get the templateId:
$policyTemplates = Get-JcSdkPolicyTemplate
$policyTemplate = $policyTemplates | Where-Object { $_.name -eq "custom_oma_uri_mdm_windows" }
$templateId = $policyTemplate.id
New-JCPolicy

  1. Create a policy by passing a uriList:
$uriList = @(
                @{ uri = "a"; format = "int"; value = 2 },
                @{ uri = "b"; format = "string"; value = "test" },
                @{ uri = "c"; format = "boolean"; value = "true" }, # Corrected: $true is the boolean literal
                @{ uri = "d"; format = "float"; value = 2.5 } # Corrected: 2.5 is the float literal
                @{ uri = "e"; format = "xml"; value = "<xml>test</xml>" },
                @{ uri = "f"; format = "base64"; value = "dGVzdA==" }
            )

$newPolicy = New-JCPolicy -templateID $templateId -Name "Windows - Custom MDM Policy" -uriList $uriList
  1. Test policy creation for each format with valid and invalid values. Invalid values should cause errors and stop policy creation.
  2. Create policies without passing a uriList:
    New-JCPolicy -templateID $templateId -Name "Missing URI Policy"
    This utilizes the new private function, New-UriListItem.

Set-JCPolicy

  1. Edit the first policy you created from using the New-JCPolicy with -uriList param
$testUriList = @(
                @{ uri = "testA"; format = "int"; value = 100 },
                @{ uri = "testB"; format = "string"; value = "example string" },
                @{ uri = "testC"; format = "boolean"; value = "false" },
                @{ uri = "testD"; format = "float"; value = 3.14159 },
                @{ uri = "testE"; format = "xml"; value = "<data><item>test data</item></data>" },
                @{ uri = "testF"; format = "base64"; value = "SGVsbG8gV29ybGQh" } # Base64 for "Hello World!"
            )
Set-JCPolicy -PolicyID $newPolicy.id -uriList $testUriList

Validate that each each values are edited
2. Edit policy with invalid values and format, ensure it throws an error and not continue.
3. Edit policy using the menu system
image

Get-JCPolicy

  1. Get policy:
$getPolicy = Get-JCPolicy -id $newPolicy.id 
$getPolicy.values.value

@kmaranionjc kmaranionjc requested a review from a team as a code owner April 16, 2025 16:51
@kmaranionjc kmaranionjc added minor minor version release PowerShell Module Release for JumpCloud PowerShell Module labels Apr 16, 2025
@jworkmanjc jworkmanjc self-requested a review April 17, 2025 15:14
jworkmanjc
jworkmanjc previously approved these changes Apr 17, 2025
@gweinjc gweinjc self-requested a review April 18, 2025 16:55
Copy link
Copy Markdown
Contributor

@gweinjc gweinjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont see any glaring issues with the release workflow

@kmaranionjc kmaranionjc merged commit d7a733e into master Apr 21, 2025
10 checks passed
@kmaranionjc kmaranionjc deleted the JumpCloudModule_2.18 branch April 21, 2025 14:12
@kmaranionjc kmaranionjc temporarily deployed to PublishToPSGallery April 21, 2025 14:14 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor minor version release PowerShell Module Release for JumpCloud PowerShell Module

Development

Successfully merging this pull request may close these issues.

3 participants