Skip to content

Commit

Permalink
win: improve Windows feature disablement scripts
Browse files Browse the repository at this point in the history
- 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
undergroundwires committed Apr 6, 2024
1 parent 7b546c5 commit 08572aa
Showing 1 changed file with 515 additions and 84 deletions.
Loading

0 comments on commit 08572aa

Please sign in to comment.