Skip to content

Remove PowerShell 2.0 Compatibility References#4

Merged
aybouzaglou merged 2 commits intomainfrom
claude/remove-powershell-2-compliance-011CUSEks9mD2ti7UwYEuEXN
Oct 24, 2025
Merged

Remove PowerShell 2.0 Compatibility References#4
aybouzaglou merged 2 commits intomainfrom
claude/remove-powershell-2-compliance-011CUSEks9mD2ti7UwYEuEXN

Conversation

@aybouzaglou
Copy link
Owner

No description provided.

Removed all references to PowerShell 2.0 compliance throughout the codebase
and updated them to require PowerShell 5.0+ as PowerShell 2.0 is now
completely deprecated.

Updated files:
- Template files (Application and Script templates)
- Component files (ScanSnapHome)
- Shared function libraries (Logging, Software Detection, Validation, File Operations, Registry Helpers, Network Utils)

All scripts now require PowerShell 5.0 or higher.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated the PSVersion requirement from 2.0 to 5.0 in the FocusedDebloat
script to align with the repository-wide PowerShell 5.0+ requirement.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@aybouzaglou aybouzaglou merged commit 2db8fcc into main Oct 24, 2025
1 check failed
@aybouzaglou aybouzaglou deleted the claude/remove-powershell-2-compliance-011CUSEks9mD2ti7UwYEuEXN branch October 24, 2025 15:17
@gemini-code-assist
Copy link

Summary of Changes

Hello @aybouzaglou, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request systematically updates the declared PowerShell compatibility for various scripts and templates from PowerShell 2.0+ to PowerShell 5.0+. The primary purpose of this change is to modernize the codebase's stated requirements, ensuring alignment with current PowerShell environments and potentially paving the way for the adoption of newer language features and cmdlets. The impact is a clearer understanding of the expected runtime for these components and a move away from legacy PowerShell versions.

Highlights

  • PowerShell Compatibility Update: The minimum PowerShell compatibility requirement has been updated from PowerShell 2.0+ to PowerShell 5.0+ across numerous scripts and templates. This change is reflected in the .NOTES and .REQUIRES sections of the affected files.
  • ZIP Extraction Comment Clarification: A comment in FileOperations.ps1 regarding .NET Framework-based ZIP extraction has been updated to explicitly state its compatibility with PowerShell 5.0+, aligning with the broader compatibility changes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes references to PowerShell 2.0 compatibility and updates them to PowerShell 5.0+ in several PowerShell scripts. The changes primarily involve updating the compatible PowerShell version in the script headers and documentation. The review focuses on ensuring the changes are correctly applied and that no unintended consequences arise from dropping support for older PowerShell versions.

customwhitelist(String) ; skipwindows(Boolean) ; skiphp(Boolean) ; skipdell(Boolean) ; skiplenovo(Boolean)
.REQUIRES
LocalSystem ; PSVersion >=2.0
LocalSystem ; PSVersion >=5.0

Choose a reason for hiding this comment

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

high

The script's .REQUIRES directive now specifies PSVersion >= 5.0. Ensure that all functions and cmdlets used in this script are compatible with PowerShell 5.0 and later. Verify that no functionality is lost due to the removal of PowerShell 2.0 compatibility.

Consider adding a comment explaining why PowerShell 5.0 is now required, highlighting any specific features or cmdlets used that necessitate this version.

- File attachment support for installers
- Registry-based software detection
- PowerShell 2.0+ compatible
- PowerShell 5.0+ compatible

Choose a reason for hiding this comment

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

high

The template is now marked as PowerShell 5.0+ compatible. Ensure that all embedded functions and example code within this template are indeed compatible with PowerShell 5.0 and later. Verify that no functionality is lost due to the removal of PowerShell 2.0 compatibility.

Suggestion: Add a comment highlighting any specific features or cmdlets used that necessitate PowerShell 5.0+.

- Flexible timeout support
- System state validation
- PowerShell 2.0+ compatible
- PowerShell 5.0+ compatible

Choose a reason for hiding this comment

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

high

The template is now marked as PowerShell 5.0+ compatible. Ensure that all embedded functions and example code within this template are indeed compatible with PowerShell 5.0 and later. Verify that no functionality is lost due to the removal of PowerShell 2.0 compatibility.

Suggestion: Add a comment highlighting any specific features or cmdlets used that necessitate PowerShell 5.0+.

Comment on lines +275 to 277
# Use .NET Framework for ZIP extraction (PowerShell 5.0+ compatible)
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($ArchivePath, $DestinationPath)

Choose a reason for hiding this comment

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

medium

The comment indicates that .NET Framework is used for ZIP extraction and is PowerShell 5.0+ compatible. This comment should accurately reflect the current compatibility requirement. If the code relies on features specific to PowerShell 5.0 or later for ZIP extraction, this comment is appropriate. Otherwise, consider rephrasing to avoid confusion.

Suggestion: Verify if the .NET Framework usage indeed requires PowerShell 5.0+ and adjust the comment accordingly.

switch ($ArchiveType) {
'ZIP' {
# Use .NET Framework for ZIP extraction (PowerShell 2.0 compatible)
# Use .NET Framework for ZIP extraction (PowerShell 5.0+ compatible)

Choose a reason for hiding this comment

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

medium

The comment indicates that .NET Framework is used for ZIP extraction and is PowerShell 5.0+ compatible. However, the code itself doesn't seem to have changed. If the underlying implementation relies on PowerShell 5.0+ features, this change is correct. Otherwise, it might be misleading.

Suggestion: Double-check if the .NET Framework usage truly necessitates PowerShell 5.0+ and update the comment accordingly. If not, revert the comment to reflect the actual compatibility.

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.

2 participants