diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ComputerInfo.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ComputerInfo.Tests.ps1 index 8962cdc617..824de39102 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ComputerInfo.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Management/Get-ComputerInfo.Tests.ps1 @@ -7,6 +7,11 @@ $computerInfoAll = $null $testStartTime = Get-Date +$excludedProperties = @( + "CsPhysicallyInstalledMemory", + "OsServerLevel" +) + function Get-ComputerInfoForTest { # NOTE: $forceRefresh only applies to the case where $properties is null @@ -1041,8 +1046,13 @@ try { # easier to debug the problem if we know *all* the failures # issue: https://github.com/PowerShell/PowerShell/issues/4762 # CsPhysicallyInstalledMemory not available when run in nightly builds - It "Test 01. Standard Property test - all properties ()" -testcase $testCases -Pending { + It "Test 01. Standard Property test - all properties ()" -testcase $testCases { param ( $property ) + + if ($excludedProperties -contains $property) { + Set-ItResult -Pending -Because "'$property' is not available in nightly builds" + } + $specialProperties = "CsNetworkAdapters","CsProcessors","OsHotFixes" if ( $specialProperties -contains $property ) {