diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 15a19653c..462be1fbc 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -228,6 +228,21 @@ function Get-AzModuleVersions { return $azModuleVersions } +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 '
' + + [PSCustomObject]@{ + Module = $moduleName + Version = $moduleVersions + } + } +} + function Get-DotNetCoreSdkVersions { $unsortedDotNetCoreSdkVersion = dotnet --list-sdks list | ForEach-Object { $_ | Take-OutputPart -Part 0 } $dotNetCoreSdkVersion = $unsortedDotNetCoreSdkVersion -join " " diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 84225865a..a5e71b1db 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -40,7 +40,6 @@ $markdown += New-MDList -Style Unordered -Lines @( (Get-NodeVersion), (Get-PythonVersion), (Get-Python3Version), - (Get-PowershellVersion), (Get-RubyVersion), (Get-SwiftVersion), (Get-JuliaVersion) @@ -213,6 +212,13 @@ $markdown += Build-MSSQLToolsSection $markdown += New-MDHeader "Cached Tools" -Level 3 $markdown += Build-CachedToolsSection +$markdown += New-MDHeader "PowerShell Tools" -Level 3 +$markdown += New-MDList -Lines (Get-PowershellVersion) -Style Unordered + +$markdown += New-MDHeader "PowerShell Modules" -Level 4 +$markdown += Get-PowerShellModules | New-MDTable +$markdown += New-MDNewLine + $markdown += New-MDHeader "Android" -Level 3 $markdown += Build-AndroidTable | New-MDTable $markdown += New-MDNewLine