diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 index 3f5badf54..873f35ce8 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Common.psm1 @@ -371,3 +371,9 @@ function Build-PackageManagementEnvironmentTable { } ) } + +function Get-SystemdVersion { + $matches = [regex]::Matches((systemctl --version | head -n 1), "\((.*?)\)") + $result = foreach ($match in $matches) {$match.Groups[1].Value} + return $result +} \ No newline at end of file diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index d8cd6b119..5edc90683 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -30,6 +30,7 @@ $softwareReport = [SoftwareReport]::new("Ubuntu $(Get-OSVersionShort)") $softwareReport.Root.AddToolVersion("OS Version:", $(Get-OSVersionFull)) $softwareReport.Root.AddToolVersion("Kernel Version:", $(Get-KernelVersion)) $softwareReport.Root.AddToolVersion("Image Version:", $env:IMAGE_VERSION) +$softwareReport.Root.AddToolVersion("Systemd version:", $(Get-SystemdVersion)) $installedSoftware = $softwareReport.Root.AddHeader("Installed Software")