Skip to content

Function SoftwareProduct

Mark Wragg edited this page Jun 17, 2019 · 2 revisions

SoftwareProduct

SYNOPSIS

Test the installed Software Packages.

DESCRIPTION

Test the Existance of a Software Package or the Value of a given Property.

PARAMETERS

Target [String]

[Parameter(
  Mandatory = $true,
  Position = 1,
  ParameterSetName = 'Set 1')]

Property [String]

[Parameter(
  Mandatory = $true,
  Position = 2,
  ParameterSetName = 'Set 1')]

Should [ScriptBlock]

[Parameter(
  Mandatory = $true,
  Position = 3,
  ParameterSetName = 'Set 1')]

Assertions

Be, BeExactly, Exist, Match, MatchExactly

EXAMPLES

-------------------------- EXAMPLE 1 --------------------------

SoftwareProduct 'Microsoft .NET Framework 4.6.1' { Should Exist }

-------------------------- EXAMPLE 2 --------------------------

SoftwareProduct 'Microsoft SQL Server 2016' DisplayVersion { Should Be 13.0.1100.286  }

-------------------------- EXAMPLE 3 --------------------------

SoftwareProduct 'IIS 10.0 Express' InstallLocation { Should Match 'C:\Program Files (x86)' }