5

Finding Out When A PowerShell Cmdlet Was Introduced

 3 years ago
source link: https://thomasrayner.ca/finding-out-when-a-powershell-cmdlet-was-introduced/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Finding Out When A PowerShell Cmdlet Was Introduced

In the PowerShell Slack (invite yourself at bit.ly/psslack), there was a very brief debate over when the Expand-Archive cmdlet was introduced to PowerShell. This is absolutely information that can be found online, but there’s a few different ways.

Some cmdlets have this information built into the help, some share this information in the online docs. Since the core cmdlets documentation are open sourced and on GitHub, however, you can go straight to the source and quickly answer this question for yourself.

If you go to https://github.com/powershell/powershell-docs, you’ll find all the documentation for the core PowerShell cmdlets. In the Reference folder, you’ll see documentation for all the currently supported versions of PowerShell (back to 3.0). The docs for older cmdlets are in there too, but typically you’re going to be looking for if a cmdlet was introduced in version 4 or 5, in my experience.

Click on the Find File button in GitHub, and you’ll be presented with a search screen.

2018-07-16-08_55_35-PowerShell_PowerShell-Docs_-The-official-PowerShell-documentation-sources-e1531756898953.png
2018-07-16-08_52_08-PowerShell-Docs_reference-at-staging-%C2%B7-PowerShell_PowerShell-Docs-1024x353.png

From there, type in the name of the cmdlet, and the search will start to populate. Let’s see when the Expand-Archive cmdlet was introduced.

2018-07-16-08_54_22-File-Finder-1024x381.png

You can see that this core cmdlet is in the docs for versions 5.0, 5.1 and 6. That means that we can assume this cmdlet was introduced in PowerShell version 5.

Written on July 18, 2018

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK