11---
22description : Avoid overwriting built in cmdlets
3- ms.date : 06/28/2023
3+ ms.date : 12/12/2024
44ms.topic : reference
55title : AvoidOverwritingBuiltInCmdlets
66---
@@ -14,7 +14,7 @@ This rule flags cmdlets that are available in a given edition/version of PowerSh
1414operating system which are overwritten by a function declaration. It works by comparing function
1515declarations against a set of allowlists that ship with PSScriptAnalyzer. These allowlist files are
1616used by other PSScriptAnalyzer rules. More information can be found in the documentation for the
17- [ UseCompatibleCmdlets] ( ./UseCompatibleCmdlets.md ) rule.
17+ [ UseCompatibleCmdlets] [ 01 ] rule.
1818
1919## Configuration
2020
@@ -37,14 +37,17 @@ following your settings file.
3737
3838The parameter ` PowerShellVersion ` is a list of allowlists that ship with PSScriptAnalyzer.
3939
40- ** Note** : The default value for ` PowerShellVersion ` is ` core-6.1.0-windows ` if PowerShell 6 or
41- later is installed, and ` desktop-5.1.14393.206-windows ` if it is not.
40+ > [ !NOTE]
41+ > The default value for ` PowerShellVersion ` is ` core-6.1.0-windows ` if PowerShell 6 or
42+ > later is installed, and ` desktop-5.1.14393.206-windows ` if it's not.
4243
4344Usually, patched versions of PowerShell have the same cmdlet data, therefore only settings of major
4445and minor versions of PowerShell are supplied. One can also create a custom settings file as well
45- with the
46- [ New-CommandDataFile.ps1] ( https://github.com/PowerShell/PSScriptAnalyzer/blob/development/Utils/New-CommandDataFile.ps1 )
47- script and use it by placing the created ` JSON ` into the ` Settings ` folder of the ` PSScriptAnalyzer `
48- module installation folder, then the ` PowerShellVersion ` parameter is just its file name (that can
49- also be changed if desired). Note that the ` core-6.0.2-* ` files were removed in PSScriptAnalyzer
50- 1.18 since PowerShell 6.0 reached end of life.
46+ with the [ New-CommandDataFile.ps1] [ 02 ] script and use it by placing the created ` JSON ` into the
47+ ` Settings ` folder of the ` PSScriptAnalyzer ` module installation folder, then the ` PowerShellVersion `
48+ parameter is just its filename (that can also be changed if desired). Note that the ` core-6.0.2-* `
49+ files were removed in PSScriptAnalyzer 1.18 since PowerShell 6.0 reached end of life.
50+
51+ <!-- link references -->
52+ [ 01 ] : ./UseCompatibleCmdlets.md
53+ [ 02 ] : https://github.com/PowerShell/PSScriptAnalyzer/blob/main/Utils/New-CommandDataFile.ps1
0 commit comments