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);