KEMBAR78
DSCv3 admin settings resource by JohnMcPMS · Pull Request #5458 · microsoft/winget-cli · GitHub
Skip to content

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented May 14, 2025

Change

Adds an admin settings resource to mirror the existing v2.

Also adds winget settings reset --all to reset all admin settings to their default values (respecting group policy of course).

Validation

Added E2E tests for invoking the resource.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner May 14, 2025 23:09
AmelBawa-msft
AmelBawa-msft previously approved these changes May 15, 2025

namespace AppInstaller::CLI
{
// A resource for managing source configuration.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// A resource for managing source configuration.
// A resource for managing admin settings.

throw CommandException(Resource::String::InvalidArgumentSpecifierError(ArgumentCommon::ForType(Execution::Args::Type::SettingName).Name));
}

return;
Copy link
Contributor

Choose a reason for hiding this comment

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

if (ContainsAll && ContansSettingsName)
{
throw ArgumentConflict()?
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Except that it also needs to return if not throwing.

Copy link
Contributor

@yao-msft yao-msft left a comment

Choose a reason for hiding this comment

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

Also add to Predefined Export list with elevation true?

<value>Manage administrator settings</value>
</data>
<data name="DscAdminSettingsResourceLongDescription" xml:space="preserve">
<value>Allows management of administrator settings the DSC v3 command line interface protocol. See the help link for details.</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<value>Allows management of administrator settings the DSC v3 command line interface protocol. See the help link for details.</value>
<value>Allows management of administrator settings through the DSC v3 command line interface protocol. See the help link for details.</value>

@JohnMcPMS JohnMcPMS merged commit 1b24d12 into microsoft:master May 16, 2025
9 checks passed
@JohnMcPMS JohnMcPMS deleted the dscv3-admin-settings branch May 16, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants