Updated the Markdown manuals

This commit is contained in:
Markus Fleschutz
2024-01-03 12:11:22 +01:00
parent fa9c10d2a4
commit be47b2d002
605 changed files with 954 additions and 628 deletions

View File

@ -1,34 +1,19 @@
*check-powershell.ps1*
================
This PowerShell script queries the PowerShell status and prints it.
check-powershell.ps1
Parameters
----------
```powershell
PS> ./check-powershell.ps1 [<CommonParameters>]
[<CommonParameters>]
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
```
Example
-------
```powershell
PS> ./check-powershell.ps1
PowerShell 5.1.19041.2673 Desktop edition (10 modules, 1458 cmdlets, 172 aliases)
```
Notes
-----
Author: Markus Fleschutz | License: CC0
Related Links
-------------
https://github.com/fleschutz/PowerShell
Script Content
--------------
```powershell
@ -39,23 +24,33 @@ Script Content
This PowerShell script queries the PowerShell status and prints it.
.EXAMPLE
PS> ./check-powershell.ps1
✅ PowerShell 5.1.19041.2673 Desktop edition (10 modules, 1458 cmdlets, 172 aliases)
✅ PowerShell 5.1.19041.2673 Desktop edition (1 profile, 10 modules, 1458 cmdlets, 172 aliases)
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
function GetNumberOfProfiles {
[int]$count = 0
if (Test-Path $PROFILE.AllUsersAllHosts) { $count++ }
if (Test-Path $PROFILE.AllUsersCurrentHost) { $count++ }
if (Test-Path $PROFILE.CurrentUserAllHosts) { $count++ }
if (Test-Path $PROFILE.CurrentUserCurrentHost) { $count++ }
return $count
}
try {
$version = $PSVersionTable.PSVersion
$edition = $PSVersionTable.PSEdition
$numProfiles = GetNumberOfProfiles
$numModules = (Get-Module).Count
$numAliases = (Get-Alias).Count
if ($IsLinux) {
"✅ PowerShell $version $edition edition ($numModules modules, $numAliases aliases)"
"✅ PowerShell $version $edition edition ($numProfiles profile, $numModules modules, $numAliases aliases)"
} else {
$numCmdlets = (Get-Command -Command-Type cmdlet).Count
"✅ PowerShell $version $edition edition ($numModules modules, $numCmdlets cmdlets, $numAliases aliases)"
"✅ PowerShell $version $edition edition ($numProfiles profile, $numModules modules, $numCmdlets cmdlets, $numAliases aliases)"
}
exit 0 # success
} catch {
@ -64,4 +59,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 12/16/2023 10:12:19)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 01/03/2024 12:10:44)*