[Windows] Add the list of installed PowerShell modules to documentation (#1266)

* documenation about powershell modules

* add powershell modules documenation

* add PSMODULES_ROOT_FOLDER
This commit is contained in:
Aleksandr Chebotov
2020-07-23 16:32:41 +03:00
committed by GitHub
parent 544204ec06
commit 00463a8fab
14 changed files with 112 additions and 40 deletions

View File

@@ -243,6 +243,21 @@ function Get-PowerShellAzureModules {
}
}
function Get-PowerShellModules {
$modules = (Get-ToolsetContent).powershellModules.name
$psModules = Get-Module -Name $modules -ListAvailable | Sort-Object Name | Group-Object Name
$psModules | ForEach-Object {
$moduleName = $_.Name
$moduleVersions = ($_.group.Version | Sort-Object -Unique) -join '<br>'
[PSCustomObject]@{
Module = $moduleName
Version = $moduleVersions
}
}
}
function Get-CachedDockerImages {
return (docker images --digests --format "* {{.Repository}}:{{.Tag}}").Split("*") | Where-Object { $_ }
}

View File

@@ -1,6 +1,3 @@
# Install MarkdownPS module for software report generation
Install-Module MarkdownPS -Force -Scope AllUsers
Import-Module MarkdownPS
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Android.psm1") -DisableNameChecking
Import-Module (Join-Path $PSScriptRoot "SoftwareReport.Browsers.psm1") -DisableNameChecking
@@ -41,7 +38,6 @@ $markdown += New-MDList -Style Unordered -Lines @(
(Get-PHPVersion),
(Get-JuliaVersion),
(Get-PerlVersion),
(Get-PowershellCoreVersion),
(Get-NodeVersion)
)
@@ -190,7 +186,11 @@ $markdown += "``Location $($frameworks.Path)``"
$markdown += New-MDNewLine
$markdown += New-MDList -Lines $frameworks.Versions -Style Unordered
$markdown += New-MDHeader "Azure Powershell Modules" -Level 3
# PowerShell Tools
$markdown += New-MDHeader "PowerShell Tools" -Level 3
$markdown += New-MDList -Lines (Get-PowershellCoreVersion) -Style Unordered
$markdown += New-MDHeader "Azure Powershell Modules" -Level 4
$markdown += Get-PowerShellAzureModules | New-MDTable
$markdown += @'
```
@@ -201,6 +201,10 @@ All other versions are saved but not installed.
'@
$markdown += New-MDNewLine
$markdown += New-MDHeader "Powershell Modules" -Level 4
$markdown += Get-PowerShellModules | New-MDTable
$markdown += New-MDNewLine
# Android section
$androidInstalledPackages = Get-AndroidInstalledPackages