Azure / Azure/ArcEnabledServersGroupPolicy

Setting -AssessOnly does not work & does not support subfolders for ArcRemoteShare in 1.0.8

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
17
Forks
25
PR merge metrics
No merged PRs in 30d

Description

In version 1.0.8, the AssessOnly check doesn't work at all. The issues I can see are:

In ScheduledTask.xml, the ArcRemoteShare switch parameter in the Scheduled Task now has single quotations around it:

https://github.com/Azure/ArcEnabledServersGroupPolicy/blob/4ab7424082c3ac7dda5fc9a7fe2f59a705fa2162/ArcGPO/%7B1BAEEB14-8CB1-42FC-960B-55C4B45AFB0B%7D/DomainSysvol/GPO/Machine/Preferences/ScheduledTasks/ScheduledTasks.xml#L4

But the code that updates it in DeployGPO still assumes there are no single quotes (from a previous version?)

https://github.com/Azure/ArcEnabledServersGroupPolicy/blob/4ab7424082c3ac7dda5fc9a7fe2f59a705fa2162/DeployGPO.ps1#L179

In addition, if the ArcRemoteShare has a backslash in it (e.g. ShareName\FolderName to store the logs in a subfolder) then the regular expression will break.

I'll submit a PR shortly with both of these fixed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the ArcRemoteShare parameter in ArcGPO/{1BAEEB14-8CB1-42FC-960B-55C4B45AFB0B}/DomainSysvol/GPO/Machine/Preferences/ScheduledTasks/ScheduledTasks.xml and the update logic at DeployGPO.ps1 line 179. Check the AssessOnly path and its regular expression for quoted parameters and backslash-containing subfolders; done means both forms are updated correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.