Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/janestreet/ps7compatibilityrules

PSScriptAnalyzer rules to help migrating PowerShell 5.1 scripts to PowerShell 7
https://github.com/janestreet/ps7compatibilityrules

powershell psscriptanalyzer pwsh

Last synced: about 2 months ago
JSON representation

PSScriptAnalyzer rules to help migrating PowerShell 5.1 scripts to PowerShell 7

Awesome Lists containing this project

README

        

A collection of [PSScriptAnalyzer](https://github.com/PowerShell/PSScriptAnalyzer) rules to highlight
potential PowerShell 7 compatibility issues when migrating from PowerShell 5.1

# Usage
```powershell
git clone https://github.com/janestreet/PS7CompatibilityRules.git
Invoke-ScriptAnalyzer -Path '' -Recurse -CustomRulePath .\PS7CompatibilityRules
```
# Included Rules

| Rule | Description |
| -----| ----------- |
| AvoidDeprecatedCommands | Flag commands that are listed on Microsoft's website as incompatible with PS7 |
| AvoidDeprecatedTypes | Flag references to deprecated types that are incompatible with PS7 |
| AvoidGetSetAccessControl | Flag GetAccessControl() or SetAccessControl() calls |
| CommandRecommendations | Recommendations for specific commands that have different behavior in PS7 |
| NoHtmlParsing | Flag code that relies on HTML parsing done in web cmdlets |
| SelectObjectMustSpecifyProperty | Select-Object ExcludeProperty is effective only when the command also includes a Property parameter |