Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win: improve Windows feature disablement scripts
- Migrate feature disablement to PowerShell for clarity and robustness. - Improve log outputs and error handling for missing or default-disabled features. This fixes false-positive errors by treating the absence of a targeted feature as a success condition, and treats features disabled by the OS as non-issues. - Fix revert logic to align with OS defaults, correcting previous behavior that indiscriminately enabled features without considering their default state. - Fix usage of incorrect feature name for `LDPPrintService`, correcting attempts to disable a non-existing feature. - Standardize script recommendations for outdated or missing features on modern Windows versions by recommending them on 'Standard' selection, providing clearer guidance for users. - Rename feature-related scripts for consistency with Windows display names, improving consistency and script discoverability. - Expand documentation for all feature-disabling scripts, adding details such as display names, descriptions, and default states, thereby informing users about the specifics and rationale of each script. - Rename `DisableFeature` function to `DisableWindowsFeature` for increased descriptiveness and alignment with PowerShell conventions. - Harmonize the use of the `DisableWindowsFeature` function across scripts targeting various features, including SMBv1 and PowerShell 2.0 downgrade attacks, enhancing consistency and maintainability. - Add code comments in the generated disable/enable feature scripts, improving understandability for users. - Add the ability to revert to default OS behavior for feature enablement/disablement to align with OS defaults.
- Loading branch information