microsoft / ComplianceUtility

The 'Compliance Utility' is a powerful tool that helps troubleshoot and diagnose sensitivity labels, policies, settings and more. Whether you need to fix issues or reset configurations, this tool has you covered.
MIT License
24 stars 5 forks source link

Reset silent cancels with no action #1

Closed bholzmmc closed 2 years ago

bholzmmc commented 2 years ago

Using the -Reset Silent option the log entries show the function being cancelled: 2022-07-06, 10:56, fncInitialize, OS edition, Microsoft Windows 10 Enterprise 2022-07-06, 10:56, fncInitialize, OS version, 10.0.19044.0 2022-07-06, 10:56, fncInitialize, OS 64-Bit, True 2022-07-06, 10:56, fncInitialize, Script module version, 3.0.3 2022-07-06, 10:56, fncInitialize, Username, ######## 2022-07-06, 10:56, fncInitialize, Machine name, ########### 2022-07-06, 10:56, fncInitialize, PowerShell Host, ConsoleHost 2022-07-06, 10:56, fncInitialize, PowerShell Version, 5.1.19041.1682 2022-07-06, 10:56, fncInitialize, PowerShell Edition, Desktop 2022-07-06, 10:56, fncInitialize, PowerShell Current culture, en-US 2022-07-06, 10:56, fncInitialize, PowerShell Current UI culture, en-US 2022-07-06, 10:56, fncInitialize, Running privileged, True 2022-07-06, 10:56, UnifiedLabelingSupportTool, Parameter Reset, Triggered 2022-07-06, 10:56, fncReset, Reset Silent, Initiated 2022-07-06, 10:56, fncReset, Reset, Canceled

It would seem the variable $Private:ReadHost is not being set when the silent option is being used.

schiroky commented 2 years ago

Thank you for reporting this issue! I can confirm your findings. I'll fix it with the next update, planned for this month.

schiroky commented 2 years ago

The necessary code changes have been implemented and an updated version of the tool will be released soon.

schiroky commented 2 years ago

Update version 3.0.4 has been published.