-
Notifications
You must be signed in to change notification settings - Fork 0
Remove PowerShell 2.0 Compatibility References #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ Provides file and directory utility functions optimized for Datto RMM environmen | |
| .NOTES | ||
| Version: 3.0.0 | ||
| Author: Datto RMM Function Library | ||
| Compatible: PowerShell 2.0+, Datto RMM Environment | ||
| Compatible: PowerShell 5.0+, Datto RMM Environment | ||
| #> | ||
|
|
||
| function New-RMMDirectory { | ||
|
|
@@ -272,7 +272,7 @@ function Expand-RMMArchive { | |
|
|
||
| switch ($ArchiveType) { | ||
| 'ZIP' { | ||
| # Use .NET Framework for ZIP extraction (PowerShell 2.0 compatible) | ||
| # Use .NET Framework for ZIP extraction (PowerShell 5.0+ compatible) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
| Add-Type -AssemblyName System.IO.Compression.FileSystem | ||
| [System.IO.Compression.ZipFile]::ExtractToDirectory($ArchivePath, $DestinationPath) | ||
|
Comment on lines
+275
to
277
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ Features: | |
| - Comprehensive error handling and logging | ||
| - File attachment support for installers | ||
| - Registry-based software detection | ||
| - PowerShell 2.0+ compatible | ||
| - PowerShell 5.0+ compatible | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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+. |
||
|
|
||
| .COMPONENT | ||
| Category: Applications (Software Deployment) | ||
|
|
@@ -36,7 +36,7 @@ ForceReinstall = false | |
| .NOTES | ||
| Version: 1.0.0 | ||
| Author: Datto RMM Self-Contained Architecture | ||
| Compatible: PowerShell 2.0+, Datto RMM Environment | ||
| Compatible: PowerShell 5.0+, Datto RMM Environment | ||
| Deployment: DIRECT (paste script content directly into Datto RMM) | ||
| #> | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ Features: | |
| - Comprehensive error handling and logging | ||
| - Flexible timeout support | ||
| - System state validation | ||
| - PowerShell 2.0+ compatible | ||
| - PowerShell 5.0+ compatible | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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+. |
||
|
|
||
| .COMPONENT | ||
| Category: Scripts (General Automation/Maintenance) | ||
|
|
@@ -36,7 +36,7 @@ DryRun = false | |
| .NOTES | ||
| Version: 1.0.0 | ||
| Author: Datto RMM Self-Contained Architecture | ||
| Compatible: PowerShell 2.0+, Datto RMM Environment | ||
| Compatible: PowerShell 5.0+, Datto RMM Environment | ||
| Deployment: DIRECT (paste script content directly into Datto RMM) | ||
| #> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script's
.REQUIRESdirective now specifiesPSVersion >= 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.