From ed21d3aaf45b5e7b9294091ab1049a2eacbadd65 Mon Sep 17 00:00:00 2001 From: Marc Niederwieser Date: Mon, 7 Aug 2023 02:36:25 +0200 Subject: [PATCH] V7.25 --- MnCommonPsToolLib/MnCommonPsToolLib.psm1 | 2 +- MnCommonPsToolLib/MnCommonPsToolLib_Windows.ps1 | 2 +- UnitTests/MnCommonPsToolLibUnitTest_Help_Os.ps1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MnCommonPsToolLib/MnCommonPsToolLib.psm1 b/MnCommonPsToolLib/MnCommonPsToolLib.psm1 index fc932e4..8773f9e 100644 --- a/MnCommonPsToolLib/MnCommonPsToolLib.psm1 +++ b/MnCommonPsToolLib/MnCommonPsToolLib.psm1 @@ -679,7 +679,7 @@ function ProcessListInstalledAppx (){ if( ! (OsIsWindows) ){ return # If you want to load this module into PowerShell please use 'Import-Module -SkipEditionCheck' syntax. } return [String[]] (@()+(Get-AppxPackage | Where-Object{$null -ne $_} | - ForEach-Object{ "$($_.PackageFullName)" } | Sort)); } + ForEach-Object{ "$($_.PackageFullName)" } | Sort-Object)); } function ProcessGetCommandInEnvPathOrAltPaths ( [String] $commandNameOptionalWithExtension, [String[]] $alternativePaths = @(), [String] $downloadHintMsg = ""){ [System.Management.Automation.CommandInfo] $cmd = Get-Command -CommandType Application -Name $commandNameOptionalWithExtension -ErrorAction SilentlyContinue | Select-Object -First 1; if( $null -ne $cmd ){ return [String] $cmd.Path; } diff --git a/MnCommonPsToolLib/MnCommonPsToolLib_Windows.ps1 b/MnCommonPsToolLib/MnCommonPsToolLib_Windows.ps1 index e125901..83c39f7 100644 --- a/MnCommonPsToolLib/MnCommonPsToolLib_Windows.ps1 +++ b/MnCommonPsToolLib/MnCommonPsToolLib_Windows.ps1 @@ -1244,7 +1244,7 @@ function ToolInstallNuPckMgrAndCommonPsGalMo(){ Select-Object Name, Status, Version, Source | StreamToTableString | StreamToStringIndented; OutProgress "List of modules:"; - Get-Module | Sort Name | Select-Object Name,ModuleType,Version,Path | + Get-Module | Sort-Object Name | Select-Object Name,ModuleType,Version,Path | StreamToTableString | StreamToStringIndented; OutProgress "List of installed modules having an installdate:"; Get-InstalledModule | Where-Object{$null -ne $_ -and $null -ne $_.InstalledDate } | diff --git a/UnitTests/MnCommonPsToolLibUnitTest_Help_Os.ps1 b/UnitTests/MnCommonPsToolLibUnitTest_Help_Os.ps1 index ed301be..3219512 100644 --- a/UnitTests/MnCommonPsToolLibUnitTest_Help_Os.ps1 +++ b/UnitTests/MnCommonPsToolLibUnitTest_Help_Os.ps1 @@ -17,7 +17,7 @@ function Test_Help_Os(){ # HelpGetType ( [Object] $obj ){ return [String] $obj.GetType(); } # OsPsVersion (){ return [String] (""+$Host.Version.Major+"."+$Host.Version.Minor); } # alternative: $PSVersionTable.PSVersion.Major # OsIsWinVistaOrHigher (){ return [Boolean] ([Environment]::OSVersion.Version -ge (new-object "Version" 6,0)); } - # OsIsWin7OrHigher (){ return [Boolean] ([Environment]::OSVersion.Version -ge (new-object "Version" 6,1)); } + Assert (OsIsWin7OrHigher); Assert (OsIs64BitOs); # OsIsHibernateEnabled (){ Assert ((OsInfoMainboardPhysicalMemorySum) -gt 1000000000);