Src/Private/Private.ps1

<#
    .SYNOPSIS
        Ensures a directory path exists, creating it if necessary
#>

function Assert-Directory
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [System.String] $Path
    )
    process
    {
        if (Test-Path -Path $Path -PathType Leaf)
        {
            throw ($localized.SpecifiedPathIsNotEmptyError -f $Path)
        }
        elseif (-not (Test-Path -Path $Path))
        {
            Write-Verbose -Message ($localized.CreatingPackageDirectory -f $Path)
            $parentPath = Split-Path -Path $Path -Parent
            $childPath = Split-Path -Path $Path -Leaf
            try
            {
                $null = New-Item -Path $parentPath -Name $childPath -ItemType Directory -Force
            }
            catch
            {
                Write-Error -ErrorRecord $_ -ErrorAction Stop
            }
        }
    }
}

<#
    .SYNOPSIS
        Ensures that package metadata file is (or isn't) cached locally.
#>

function Assert-EvergreenPackageCacheMetadata
{
    [CmdletBinding()]
    param
    (
        ## Evergreen package(s) metadata to cache
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [System.String] $Name,

        ## Evergreen Api subscription key
        [Parameter(Mandatory, ValueFromPipelineByPropertyName, ParameterSetName = 'Default')]
        [System.String] $SubscriptionKey,

        ## Enumerate customer package repository.
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.String] $CustomerCode,

        ## Web proxy credential
        [Parameter(ValueFromPipelineByPropertyName, ParameterSetName = 'Default')]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.CredentialAttribute()]
        $Credential,

        ## Force refresh of cached package metadata
        [Parameter(ValueFromPipelineByPropertyName, ParameterSetName = 'Default')]
        [System.Management.Automation.SwitchParameter] $Force,

        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.SwitchParameter] $NotPresent
    )
    process
    {
        $metadataFilename = '{0}.psd1' -f $Name
        $destinationPath = Join-Path -Path $cachedMetadataPath -ChildPath $metadataFilename
        $metadataItem = Get-Item -Path $destinationPath -ErrorAction SilentlyContinue

        if ($NotPresent)
        {
            if ($null -ne $metadataItem)
            {
                Write-Verbose -Message ($localized.RemovingCachedPackageMetadata -f $metadataItem.FullName)
                Remove-Item -Path $metadataItem.FullName -Force
            }
        }
        else
        {
            if ($Force -or ($null -eq $metadataItem))
            {
                $invokeEvergreenMetadataDownloadParams = @{
                    Name            = $Name
                    SubscriptionKey = $SubscriptionKey
                    Force           = $Force
                }
                if ($PSBoundParameters.ContainsKey('CustomerCode'))
                {
                    $invokeEvergreenMetadataDownloadParams['CustomerCode'] = $CustomerCode
                }
                if ($PSBoundParameters.ContainsKey('Credential'))
                {
                    $invokeEvergreenMetadataDownloadParams['Credential'] = $Credential
                }
                $null = Invoke-EvergreenMetadataDownload @invokeEvergreenMetadataDownloadParams
            }
        }
    }
}

<#
    .SYNOPSIS
        Downloads an Evergreen package (if not already cached) and extracting any Zip packages.
#>

function Assert-EvergreenPackageDownload
{
    [CmdletBinding()]
    [OutputType()]
    param
    (
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [System.String] $Name,

        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [System.String] $SubscriptionKey,

        ## Enumerate customer package repository.
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.String] $CustomerCode,

        ## Web proxy credential
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.CredentialAttribute()]
        $Credential,

        ## Refresh cached package metadata
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.SwitchParameter] $Force,

        ## Download retry attempts
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Uint32] $Retry = 3
    )
    process
    {
        Write-Verbose -Message ($localized.FindingPackage -f $packageName)
        $saveEvergreenPackageParams = @{
            Name            = $Name
            SubscriptionKey = $SubscriptionKey
            Path            = $cachedMetadataPath
            Force           = $Force
            Platform        = 'Exe'
            Retry           = $Retry
        }
        if ($PSBoundParameters.ContainsKey('CustomerCode'))
        {
            $saveEvergreenPackageParams['CustomerCode'] = $CustomerCode
        }
        if ($PSBoundParameters.ContainsKey('Credential'))
        {
            $saveEvergreenPackageParams['Credential'] = $Credential
        }
        $exePackagePath = Save-EvergreenPackage @saveEvergreenPackageParams -ErrorAction SilentlyContinue

        if ($null -ne $exePackagePath)
        {
            Write-Output -InputObject ([PSCustomObject] @{
                Name     = $Name
                Path     = $exePackagePath
                TempPath = $null
            })
        }
        else
        {
            $saveEvergreenPackageParams['Platform'] = 'Zip'
            Write-Verbose -Message ($localized.TryingZipPackageBackup -f $Name)
            $zipPackagePath = Save-EvergreenPackage @saveEvergreenPackageParams -ErrorAction Stop

            ## Extract Zip to temporary folder
            $tempDirectory = New-TempDirectory
            Write-Verbose -Message ($localized.ExtractingArchive -f $tempDirectory)
            Expand-Archive -Path $zipPackagePath -DestinationPath $tempDirectory
            $exePackagePath = Get-Item -Path (Join-Path $tempDirectory -ChildPath 'Deploy-Application.exe')

            Write-Output -InputObject ([PSCustomObject] @{
                Name     = $Name
                Path     = $exePackagePath
                TempPath = $tempDirectory
            })
        }
    }
}

<#
    .SYNOPSIS
        Returns file version from the specified path.
 
    .NOTES
        Required to test 'Test-PackageDetectionRuleFile'
#>

function Get-FileVersion
{
    [CmdletBinding()]
    [OutputType([System.Version])]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [System.String] $Path
    )
    process
    {
        [System.Diagnostics.FileVersionInfo]::GetVersionInfo($path).FileVersionRaw -as [System.Version]
    }
}

<#
    .SYNOPSIS
        Returns unique package identifier name from package metadata, e.g. 'Virtual-Engine-ACE' or
        'Microsoft-Visual-Studio-Code-x64'.
#>

function Get-PackageMetadataPackageIdentifier
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformationAttribute()]
        [System.Collections.Hashtable] $Metadata
    )
    process
    {
        $properties = $Metadata.Properties
        $packageName = $properties.Name

        if (-not (Test-PackageExcludeArchitecture -Metadata $Metadata) -and $properties.Contains('Architecture'))
        {
            $packageName = '{0} {1}' -f $packageName, $properties.Architecture.ToLower()
        }

        if (-not (Test-PackageExcludePublisher -Metadata $metadata))
        {
            $packageName = '{0} {1}' -f $properties.Publisher, $packageName
        }

        if (-not (Test-PackageExcludeStoreApp -Metadata $metadata))
        {
            $packageName = '{0} UWP' -f $packageName
        }

        return $packageName.Replace(' ', '-')
    }
}

<#
    .SYNOPSIS
        Downloads an Evergreen package's metadata.
#>

function Invoke-EvergreenMetadataDownload
{
    [CmdletBinding()]
    param
    (
        ## Evergreen package(s) metadata to cache
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [System.String] $Name,

        ## Evergreen Api subscription key
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [System.String] $SubscriptionKey,

        ## Enumerate customer package repository.
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.String] $CustomerCode,

        ## Web proxy credential
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.CredentialAttribute()]
        $Credential,

        ## Force refresh of cached package metadata
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.SwitchParameter] $Force
    )
    process
    {
        ## Download metadata file
        Write-Verbose -Message ($localized.DownloadingPackageMetadata -f $Name)
        $invokeEvergreenPackageApiParams = @{
            Name            = $Name
            SubscriptionKey = $SubscriptionKey
            Platform        = 'Exe'
            Force           = $Force
        }
        if ($PSBoundParameters.ContainsKey('CustomerCode'))
        {
            $invokeEvergreenPackageApiParams['CustomerCode'] = $CustomerCode
        }
        if ($PSBoundParameters.ContainsKey('Credential'))
        {
            $invokeEvergreenPackageApiParams['Credential'] = $Credential
        }
        $package = Invoke-EvergreenPackageApi @invokeEvergreenPackageApiParams

        ## Evergreen API returns an empty string if there are no matching packages
        if ($package -is [System.String])
        {
            ## We have no Exe package so try Zip as backup
            $invokeEvergreenPackageApiParams['Platform'] = 'Zip'
            Write-Verbose -Message ($localized.TryingZipPackageBackup -f $Name)
            $package = Invoke-EvergreenPackageApi @invokeEvergreenPackageApiParams
        }

        if ($package -is [System.String])
        {
            throw ($localized.CannotFindPackageError -f $Name)
        }

        $invokeEvergreenPackageDownloadParams = @{
            Path     = $cachedMetadataPath
            Package  = $package
            Metadata = $true
            Force    = $Force
        }
        Invoke-EvergreenPackageDownload @invokeEvergreenPackageDownloadParams
    }
}

<#
    .SYNOPSIS
        Calls the Virtual Engine Evergreen Api.
#>

function Invoke-EvergreenPackageApi
{
    [CmdletBinding()]
    param
    (
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.String] $Name,

        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [System.String] $SubscriptionKey,

        ## Enumerate customer package repository.
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.String] $CustomerCode,

        [Parameter(ValueFromPipelineByPropertyName)]
        [ValidateSet('Exe', 'Zip', 'Intune')]
        [System.String] $Platform,

        ## Return all available package versions
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.SwitchParameter] $All,

        ## Include hidden (test) packages
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.SwitchParameter] $Hidden,

        ## Web proxy credential
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.CredentialAttribute()]
        $Credential,

        [Parameter(ValueFromRemainingArguments)]
        $RemainingArgs
    )
    process
    {
        $uri = 'https://virtualengine.azure-api.net/evergreen/packages'

        $filters = @()
        if ($PSBoundParameters.ContainsKey('Name'))
        {
            $filters += 'name={0}' -f $Name
        }
        if ($PSBoundParameters.ContainsKey('CustomerCode'))
        {
            $filters += 'customercode={0}' -f $CustomerCode
        }
        if ($PSBoundParameters.ContainsKey('Platform'))
        {
            $filters += 'platform={0}' -f $Platform
        }
        if ($All)
        {
            $filters += 'all={0}' -f $All.ToBool().ToString().ToLower()
        }
        if ($Hidden)
        {
            $filters += 'hidden={0}' -f $Hidden.ToBool().ToString().ToLower()
        }
        if ($filters.Count -gt 0)
        {
            $filterString = [System.String]::Join('&', $filters)
            $uri          = '{0}?{1}' -f $uri, $filterString
        }

        $invokeRestMethodParams = @{
            Uri     = $uri
            Headers = @{ 'Ocp-Apim-Subscription-Key' = $SubscriptionKey }
            Verbose = $false
        }
        if ($PSBoundParameters.ContainsKey('Credential'))
        {
            $invokeRestMethodParams['ProxyCredential'] = $Credential
        }
        Write-Verbose ($localized.InvokingEvergreenApi -f $uri)
        Invoke-RestMethod @invokeRestMethodParams
    }
}

<#
    .SYNOPSIS
        Downloads an Evergreen package if not already cached.
#>

function Invoke-EvergreenPackageDownload
{
    [CmdletBinding()]
    param
    (
        ## Evergreen package
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [System.Management.Automation.PSObject] $Package,

        ## Destination folder path
        [Parameter(Mandatory, ValueFromPipeline)]
        [System.String] $Path,

        ## Web proxy credential
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.CredentialAttribute()]
        $Credential,

        ## Download from the MetadataUri property
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.SwitchParameter] $Metadata,

        ## Refresh cached package metadata
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.SwitchParameter] $Force,

        ## Download retry attempts
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Uint32] $Retry = 3,

        [Parameter(ValueFromRemainingArguments)]
        $RemainingArgs
    )
    process
    {
        $destinationFilename = ($Package.Uri -as [System.Uri]).AbsolutePath.Split('/')[-1]
        $uri = $Package.Uri
        if ($Metadata)
        {
            $destinationFilename = '{0}.psd1' -f $Package.Name
            $uri                 = $Package.MetadataUri
        }
        $destinationPath = Join-Path -Path $Path -ChildPath $destinationFilename

        if ($Force -or (-not (Test-Path -Path $destinationPath)))
        {
            $invokeWebClientDownloadParams = @{
                DestinationPath = $destinationPath
                Uri             = $uri
                Retry           = $Retry
            }
            if ($PSBoundParameters.ContainsKey('Credential'))
            {
                $invokeWebClientDownloadParams['Credential'] = $Credential
            }
            Write-Verbose -Message ($localized.StartingDownload -f $destinationPath)
            Invoke-WebClientDownload @invokeWebClientDownloadParams
        }
        else
        {
            Write-Verbose -Message ($localized.ReturningCachedDownload -f $destinationPath)
            Get-Item -Path $destinationPath
        }
    }
}

function Invoke-WebClientDownload
{
<#
    .SYNOPSIS
        Downloads a (web) resource using System.Net.WebClient.
 
    .NOTES
        This solves issues when downloading resources using BITS under alternative credentials.
 
    .LINK
        https://github.com/VirtualEngine/Lability/blob/dev/Src/Private/Invoke-WebClientDownload.ps1
#>

    [CmdletBinding()]
    [OutputType([System.IO.FileInfo])]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [System.String] $DestinationPath,

        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [System.String] $Uri,

        [Parameter(ValueFromPipelineByPropertyName)]
        [System.UInt32] $BufferSize = 64KB,

        ## Download retry attempts
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Uint32] $Retry = 3,

        [Parameter(ValueFromPipelineByPropertyName)] [AllowNull()]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.CredentialAttribute()]
        $Credential
    )
    process
    {
        for ($attempt = 1; $attempt -le $Retry; $attempt++)
        {
            try
            {
                [System.Net.WebClient] $webClient = New-Object -TypeName 'System.Net.WebClient'
                $webClient.Headers.Add('user-agent', $labDefaults.ModuleName)
                $webClient.Proxy = [System.Net.WebRequest]::GetSystemWebProxy()

                if (-not $webClient.Proxy.IsBypassed($Uri))
                {
                    $proxyInfo = $webClient.Proxy.GetProxy($Uri)
                    if ($null -ne $proxyInfo.AbsoluteUri)
                    {
                        Write-Verbose -Message ($localized.UsingProxyServer -f $proxyInfo.AbsoluteUri)
                    }
                }

                if ($Credential)
                {
                    $webClient.Credentials = $Credential
                    $webClient.Proxy.Credentials = $Credential
                }
                else
                {
                    $webClient.UseDefaultCredentials = $true
                    $webClient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
                }

                [System.IO.Stream] $inputStream = $webClient.OpenRead($Uri)
                [System.UInt64] $contentLength = $webClient.ResponseHeaders['Content-Length']
                $path = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($DestinationPath)
                [System.IO.Stream] $outputStream = [System.IO.File]::Create($path)
                [System.Byte[]] $buffer = New-Object -TypeName System.Byte[] -ArgumentList $BufferSize
                [System.UInt64] $bytesRead = 0
                [System.UInt64] $totalBytes = 0
                $writeProgessActivity = $localized.DownloadingActivity -f $Uri

                do
                {
                    $iteration ++
                    $bytesRead = $inputStream.Read($buffer, 0, $buffer.Length)
                    $totalBytes += $bytesRead
                    $outputStream.Write($buffer, 0, $bytesRead)
                    ## Avoid divide by zero
                    if ($contentLength -gt 0)
                    {
                        if ($iteration % 30 -eq 0)
                        {
                            [System.Byte] $percentComplete = ($totalBytes / $contentLength) * 100
                            $writeProgressParams = @{
                                Activity = $writeProgessActivity
                                PercentComplete = $percentComplete
                                Status = $localized.DownloadStatus -f $totalBytes, $contentLength, $percentComplete
                            }
                            Write-Progress @writeProgressParams
                        }
                    }
                }
                while ($bytesRead -ne 0)

                $outputStream.Close()
                return (Get-Item -Path $path)
            }
            catch
            {
                $sleepSeconds = [System.Math]::Pow(5, $attempt)
                Write-Warning -Message ($localized.WebResourceDownloadFailedWarning -f $Uri, $sleepSeconds)
                Start-Sleep -Seconds $sleepSeconds
            }
            finally
            {
                if ($null -ne $writeProgressActivity)
                {
                    Write-Progress -Activity $writeProgessActivity -Completed
                }
                if ($null -ne $outputStream)
                {
                    $outputStream.Close()
                }
                if ($null -ne $inputStream)
                {
                    $inputStream.Close()
                }
                if ($null -ne $webClient)
                {
                    $webClient.Dispose()
                }
            }
        }

        ## if we get here we have failed all attempts
        throw ($localized.WebResourceDownloadFailedError -f $Uri)
    }
}

<#
    .SYNOPSIS
        Creates a new temporary directory.
#>

function New-TempDirectory
{
    [Cmdletbinding()]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    param ( )
    begin
    {
        if ($PSBoundParameters.ContainsKey('Debug')) { $DebugPreference = 'Continue' }
    }
    process
    {
        do
        {
            $path = [System.IO.Path]::Combine([System.IO.Path]::GetTempPath(), [System.IO.Path]::GetRandomFileName())
        }
        while ([System.IO.Directory]::Exists($path))
        Write-Debug ("Generated temp directory path '{0}'" -f $path)
        return [System.IO.Directory]::CreateDirectory($path).FullName
    }
}

<#
    .SYNOPSIS
        Writes byte array ([Byte[]]) to a file.
#>

function Set-FileBytes
{
    [CmdletBinding()]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns','')]
    [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')]
    [OutputType()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [System.Byte[]] $InputObject,

        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [System.String] $Path
    )
    process
    {
        if ($PSVersionTable['PSEdition'] -eq 'Core')
        {
            Set-Content -Path $Path -Value $InputObject -AsByteStream
        }
        else
        {
            Set-Content -Path $Path -Value $InputObject -Encoding Byte
        }
    }
}

<#
    .SYNOPSIS
        Starts and waits for a process to exit.
#>

function Start-WaitProcess
{
    [CmdletBinding(SupportsShouldProcess)]
    [OutputType([System.Int32])]
    param
    (
        # Path to process to start.
        [Parameter(Mandatory)]
        [ValidateNotNullOrEmpty()]
        [System.String] $FilePath,

        # Arguments (if any) to apply to the process.
        [Parameter()]
        [AllowNull()]
        [System.String[]] $ArgumentList,

        # Credential to start the process as.
        [Parameter()]
        [AllowNull()]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.CredentialAttribute()]
        $Credential,

        # Working directory
        [Parameter()]
        [ValidateNotNullOrEmpty()]
        [System.String] $WorkingDirectory = (Split-Path -Path $FilePath -Parent)
    )
    process
    {
        $startProcessParams = @{
            FilePath         = $FilePath
            WorkingDirectory = $WorkingDirectory
            NoNewWindow      = $true
            PassThru         = $true
        }
        $displayParams = '<None>'
        if ($ArgumentList)
        {
            $displayParams = [System.String]::Join(' ', $ArgumentList)
            $startProcessParams['ArgumentList'] = $ArgumentList
        }
        Write-Verbose ($localized.StartingProcess -f $FilePath, $displayParams)
        if ($Credential)
        {
            Write-Verbose ($localized.StartingProcessAs -f $Credential.UserName);
            $startProcessParams['Credential'] = $Credential
        }

        $exitCode = 0
        if ($PSCmdlet.ShouldProcess($FilePath, 'Start Process'))
        {
            $process = Start-Process @startProcessParams -ErrorAction Stop
            Write-Verbose ($localized.ProcessLaunched -f $process.Id)
            Wait-Process -InputObject $process
            $exitCode = [System.Convert]::ToInt32($process.ExitCode)
            Write-Verbose ($localized.ProcessExited -f $process.Id, $exitCode)
        }
        return $exitCode
    }
}

<#
    .SYNOPSIS
        Tests whether a package is installed using the package metadata Intune detection rules.
#>

function Test-PackageDetectionRule
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [System.Collections.Hashtable]
        [Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformationAttribute()]
        $Metadata,

        ## Package name used for message output.
        [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
        [System.String] $PackageName,

        [Parameter(ValueFromPipelineByPropertyName)]
        [System.String] $Path = $PWD,

        ## Does not fail application test if no detection rules are defined.
        [Parameter(ValueFromPipelineByPropertyName)]
        [System.Management.Automation.SwitchParameter] $IgnoreEmptyDetectionRule
    )
    process
    {
        if (($Metadata.Contains('Intune')) -and ($Metadata.Intune.Contains('DetectionRules')))
        {
            foreach ($detectionRule in $Metadata.Intune.DetectionRules)
            {
                switch ($detectionRule.Type)
                {
                    File
                    {
                        if (-not (Test-PackageDetectionRuleFile -DetectionRule $detectionRule))
                        {

                            return $false
                        }
                    }
                    Registry
                    {
                        if (-not (Test-PackageDetectionRuleRegistry -DetectionRule $detectionRule))
                        {
                            return $false
                        }
                    }
                    Msi
                    {
                        if (-not (Test-PackageDetectionRuleMsi -DetectionRule $detectionRule))
                        {
                            return $false
                        }
                    }
                    PowerShell
                    {
                        if (-not (Test-PackageDetectionRuleScript -DetectionRule $detectionRule -Path $Path))
                        {
                            return $false
                        }
                    }
                    Default
                    {
                        Write-Warning -Message ($localized.UnsupportedPackageDectectionRuleWarning -f $detectionRule.Type)
                    }
                }
            }
        }
        else
        {
            if ($IgnoreEmptyDetectionRule)
            {
                ## Unable to determine installation state so return nothing
                Write-Verbose -Message ($localized.NoPackageDectectionRuleDefinedWarning -f $PackageName)
                return $null
            }
            else
            {
                throw ($localized.CannotFindPackageDetectionRuleError -f $PackageName)
            }
        }

        return $true
    }
}

<#
    .SYNOPSIS
        Tests a package metadata Intune file detection rule.
#>

function Test-PackageDetectionRuleFile
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [System.Collections.Hashtable] $DetectionRule
    )
    process
    {
        $path = $DetectionRule.Path
        if (([System.Environment]::Is64BitOperatingSystem) -and
            ($DetectionRule.ContainsKey('Check32BitOn64System')) -and
            ($DetectionRule.Check32BitOn64System -eq $true))
        {
            $path = $path -replace '%ProgramFiles%', '%ProgramFiles(x86)%'
        }
        $path = '{0}\{1}' -f [System.Environment]::ExpandEnvironmentVariables($path).TrimEnd('\'), $DetectionRule.FileOrFolderName

        switch ($DetectionRule.FileDetectionType)
        {
            NotConfigured
            {
                Write-Verbose -Message ($localized.EnumeratedFilePathNotConfigured -f $path)
            }
            Exists
            {
                Write-Verbose -Message ($localized.EnumeratingPathDoesExist -f $path)
                if (Test-Path -Path $path)
                {
                    Write-Verbose -Message ($localized.EnumeratedPathDoesExist -f $path)
                    return $true
                }
                else
                {
                    Write-Verbose -Message ($localized.EnumeratedPathDoesNotExist -f $path)
                    return $false
                }
            }
            DoesNotExist
            {
                Write-Verbose -Message ($localized.EnumeratingPathDoesNotExist -f $path)
                if (-not (Test-Path -Path $path))
                {
                    Write-Verbose -Message ($localized.EnumeratedPathDoesNotExist -f $path)
                    return $true
                }
                else
                {
                    Write-Verbose -Message ($localized.EnumeratedPathDoesExist -f $path)
                    return $false
                }
            }
            Version
            {
                if (-not (Test-Path -Path $path -PathType Leaf))
                {
                    Write-Verbose -Message ($localized.EnumeratingPathDoesExist -f $path)
                    Write-Verbose -Message ($localized.EnumeratedPathDoesNotExist -f $path)
                    return $false
                }
                $version = $DetectionRule.FileDetectionValue -as [System.Version]
                $currentVersion = Get-FileVersion -Path $path
                $detectionOperator = $DetectionRule.FileDetectionOperator
                Write-Verbose -Message ($localized.EnumeratingFileVersion -f $path, $detectionOperator, $version)
                switch ($DetectionRule.FileDetectionOperator)
                {
                    NotConfigurated { }
                    Equal
                    {
                        if ($currentVersion -eq $Version)
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIs -f $currentVersion, $detectionOperator, $version)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIsNot -f $currentVersion, $detectionOperator, $version)
                            return $false

                        }
                    }
                    NotEqual
                    {
                        if ($currentVersion -ne $version)
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIs -f $currentVersion, $detectionOperator, $version)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIsNot -f $currentVersion, $detectionOperator, $version)
                            return $false
                        }
                    }
                    GreaterThan
                    {
                        if ($currentVersion -gt $version)
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIs -f $currentVersion, $detectionOperator, $version)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIsNot -f $currentVersion, $detectionOperator, $version)
                            return $false
                        }
                    }
                    GreaterThanOrEqual
                    {
                        if ($currentVersion -ge $version)
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIs -f $currentVersion, $detectionOperator, $version)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIsNot -f $currentVersion, $detectionOperator, $version)
                            return $false
                        }
                    }
                    LessThan
                    {
                        if ($currentVersion -lt $version)
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIs -f $currentVersion, $detectionOperator, $version)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIsNot -f $currentVersion, $detectionOperator, $version)
                            return $false
                        }
                    }
                    LessThanOrEqual
                    {
                        if ($currentVersion -le $version)
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIs -f $currentVersion, $detectionOperator, $version)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedFileVersionIsNot -f $currentVersion, $detectionOperator, $version)
                            return $false
                        }
                    }
                }
            }
            Default
            {
                Write-Warning -Message ($localized.UnsupportedFileDectectionRuleWarning -f $DetectionRule.FileDetectionType)
            }
        }
        return $true
    }
}

<#
    .SYNOPSIS
        Tests a package metadata Intune MSI detection rule.
#>

function Test-PackageDetectionRuleMsi
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [System.Collections.Hashtable] $DetectionRule
    )
    process
    {
        $paths = 'HKLM:\Software\Microsoft\windows\CurrentVersion\Uninstall\*', 'HKLM:\Software\WOW6432Node\Microsoft\windows\CurrentVersion\Uninstall\*'
        Write-Verbose -Message ($localized.EnumeratingMSIProductCodeDoesExist -f $DetectionRule.MsiProductCode)
        $package =  Get-ItemProperty -Path $paths -ErrorAction SilentlyContinue |
                        Where-Object { $_.PSChildName -eq $DetectionRule.MsiProductCode }
        if ($null -ne $package)
        {
            Write-Verbose -Message ($localized.EnumeratedMSIProductCodeDoesExist -f $DetectionRule.MsiProductCode)
            return $true
        }
        else
        {
            Write-Verbose -Message ($localized.EnumeratedMSIProductCodeDoesNotExist -f $DetectionRule.MsiProductCode)
            return $false
        }
    }
}

<#
    .SYNOPSIS
        Tests a package metadata Intune registry detection rule.
#>

function Test-PackageDetectionRuleRegistry
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [System.Collections.Hashtable] $DetectionRule
    )
    process
    {
        $path = $DetectionRule.RegistryKeyPath -replace 'HKEY_LOCAL_MACHINE', 'HKLM:' -replace 'HKEY_CURRENT_USER', 'HKCU:' -replace 'HKEY_CLASSES_ROOT', 'HKCR:'
        if (([System.Environment]::Is64BitOperatingSystem) -and
            ($DetectionRule.ContainsKey('Check32BitOn64System')) -and
            ($DetectionRule.Check32BitOn64System -eq $true))
        {
            $path = $path -replace '\\SOFTWARE\\', '\\SOFTWARE\\WOW6432Node\\'
        }

        if (($DetectionRule.ContainsKey('RegistryValue')) -and
            (-not [System.String]::IsNullOrEmpty($DetectionRule.RegistryValue)))
        {
            $registryValue = Get-ItemProperty -Path $path -Name $DetectionRule.RegistryValue -ErrorAction SilentlyContinue |
                                Select-Object -ExpandProperty $DetectionRule.RegistryValue -ErrorAction SilentlyContinue
        }

        switch ($DetectionRule.RegistryDetectionType)
        {
            NotConfigured
            {
                Write-Verbose -Message ($localized.EnumeratedRegistryPathNotConfigured -f $path)
            }
            Exists
            {
                if (($DetectionRule.ContainsKey('RegistryValue')) -and
                    (-not [System.String]::IsNullOrEmpty($DetectionRule.RegistryValue)))
                {
                    Write-Verbose -Message ($localized.EnumeratingPathItemDoesExist -f $path, $DetectionRule.RegistryValue)
                    if ($null -ne $registryValue)
                    {
                        Write-Verbose -Message ($localized.EnumeratedPathItemDoesExist -f $path, $DetectionRule.RegistryValue)
                        return $true
                    }
                    else
                    {
                        Write-Verbose -Message ($localized.EnumeratedPathItemDoesNotExist -f $path, $DetectionRule.RegistryValue)
                        return $false
                    }
                }
                else
                {
                    Write-Verbose -Message ($localized.EnumeratingPathExists -f $path)
                    if (Test-Path -Path $path)
                    {
                        Write-Verbose -Message ($localized.EnumeratedPathExists -f $path, $DetectionRule.RegistryValue)
                        return $true
                    }
                    else
                    {
                        Write-Verbose -Message ($localized.EnumeratedPathDoesNotExist -f $path, $DetectionRule.RegistryValue)
                        return $false
                    }
                }
            }
            DoesNotExist
            {
                if (($DetectionRule.ContainsKey('RegistryValue')) -and
                    (-not [System.String]::IsNullOrEmpty($DetectionRule.RegistryValue)))
                {
                    Write-Verbose -Message ($localized.EnumeratingPathItemDoesNotExist -f $path, $DetectionRule.RegistryValue)
                    if ($null -eq $registryValue)
                    {
                        Write-Verbose -Message ($localized.EnumeratedPathItemDoesNotExist -f $path, $DetectionRule.RegistryValue)
                        return $true
                    }
                    else
                    {
                        Write-Verbose -Message ($localized.EnumeratedPathItemDoesExist -f $path, $DetectionRule.RegistryValue)
                        return $false
                    }
                }
                else
                {
                    Write-Verbose -Message ($localized.EnumeratingPathDoesNotExist -f $path)
                    if (-not (Test-Path -Path $path))
                    {
                        Write-Verbose -Message ($localized.EnumeratedPathDoesNotExist -f $path)
                        return $true
                    }
                    else
                    {
                        Write-Verbose -Message ($localized.EnumeratedPathDoesExist -f $path)
                        return $false
                    }
                }
            }
            Default
            {
                if ($null -eq $registryValue)
                {
                    Write-Verbose -Message ($localized.EnumeratedRegistryPathValueDoesNotExist -f $path, $DetectionRule.RegistryValue)
                    return $false
                }

                Write-Verbose -Message ($localized.EnumeratingRegistryPathValue -f $path, $DetectionRule.RegistryValue)

                switch ($DetectionRule.RegistryDetectionType)
                {
                    Version
                    {
                        $value = $DetectionRule.RegistryDetectionValue -as [System.Version]
                        $currentValue = $registryValue -as [System.Version]
                    }
                    Integer
                    {
                        $value = $DetectionRule.RegistryDetectionValue -as [System.Int32]
                        $currentValue = $registryValue -as [System.Int32]
                    }
                    String
                    {
                        $value = $DetectionRule.RegistryDetectionValue -as [System.String]
                        $currentValue = $registryValue -as [System.String]
                    }
                }

                $registryDetectionOperator = $DetectionRule.RegistryDetectionOperator
                Write-Verbose -Message ($localized.EnumeratingRegistryValue -f $currentValue, $registryDetectionOperator, $value)
                switch ($DetectionRule.RegistryDetectionOperator)
                {
                    NotConfigurated
                    {
                        Write-Verbose -Message ($localized.EnumeratedRegistryPathNotConfigured -f $path)
                    }
                    Equal
                    {
                        if ($currentValue -eq $value)
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIs -f $currentValue, $registryDetectionOperator, $value)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIsNot -f $currentValue, $registryDetectionOperator, $value)
                            return $false
                        }
                    }
                    NotEqual
                    {
                        if ($currentValue -ne $value)
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIsNot -f $currentValue, $registryDetectionOperator, $value)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIs -f $currentValue, $registryDetectionOperator, $value)
                            return $false
                        }
                    }
                    GreaterThan
                    {
                        if ($currentValue -gt $value)
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIs -f $currentValue, $registryDetectionOperator, $value)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIsNot -f $currentValue, $registryDetectionOperator, $value)
                            return $false
                        }
                    }
                    GreaterThanOrEqual
                    {
                        if ($currentValue -ge $value)
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIs -f $currentValue, $registryDetectionOperator, $value)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIsNot -f $currentValue, $registryDetectionOperator, $value)
                            return $false
                        }
                    }
                    LessThan
                    {
                        if ($currentValue -lt $value)
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIs -f $currentValue, $registryDetectionOperator, $value)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIsNot -f $currentValue, $registryDetectionOperator, $value)
                            return $false
                        }
                    }
                    LessThanOrEqual
                    {
                        if ($currentValue -le $value)
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIs -f $currentValue, $registryDetectionOperator, $value)
                            return $true
                        }
                        else
                        {
                            Write-Verbose -Message ($localized.EnumeratedRegistryValueIsNot -f $currentValue, $registryDetectionOperator, $value)
                            return $false
                        }
                    }
                }
            }
        }
        return $true
    }
}

<#
    .SYNOPSIS
        Tests a package metadata Intune detection/requirement script rule.
#>

function Test-PackageDetectionRuleScript
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [System.Collections.Hashtable] $DetectionRule,

        [Parameter(ValueFromPipelineByPropertyName)]
        [System.String] $Path = $PWD
    )
    process
    {
        $isEncodedCommand = $false

        try
        {
            $encodedBytes = [System.Convert]::FromBase64String($DetectionRule.ScriptFile)
            $isEncodedCommand = $true
            Write-Verbose -Message $localized.EncodedPowerShellScriptDetected
            $scriptPath = [System.IO.Path]::GetTempFileName().Replace('.tmp','.ps1')
            Write-Verbose -Message ($localized.CreatingTemporaryFile -f $scriptPath)
            Set-FileBytes -Path $scriptPath -InputObject $encodedBytes
        }
        catch
        {
            $scriptPath = Join-Path -Path $Path -ChildPath $DetectionRule.ScriptFile
            Write-Verbose -Message ($localized.EnumeratingPathDoesExist -f $scriptPath)

        }

        $isCompliant = $true

        if (Test-Path -Path $scriptPath -PathType Leaf)
        {
            Write-Verbose -Message ($localized.EnumeratedPathDoesExist -f $scriptPath)
            $scriptPathItem = Get-Item -Path $scriptPath

            Write-Verbose -Message ($localized.EnumeratingPowerShellScript -f $scriptPathItem.Name)

            $powerShellPath = "$env:WINDIR\System32\WindowsPowerShell\v1.0\powershell.exe"
            if ($DetectionRule.RunAs32Bit -eq $true)
            {
                ## Assumption here is that we are running a x64 PowerShell process to launch a x86 process
                $powerShellPath = "$env:WINDIR\SysWOW64\WindowsPowerShell\v1.0\powershell.exe"

            }
            Write-Verbose -Message ($localized.LaunchingPowerShellProcess -f $powerShellPath)
            $scriptOutput = & $powerShellPath -NoProfile -NonInteractive -NoLogo -File "$scriptPath"

            if ($LASTEXITCODE -eq 0)
            {
                Write-Verbose -Message ($localized.EnumeratedScriptExitCodeIsValid -f $LASTEXITCODE)
            }
            else
            {
                $isCompliant = $false
                Write-Verbose -Message ($localized.EnumeratedScriptExitCodeIsNotValid -f $LASTEXITCODE)

            }

            if ($null -ne $scriptOutput)
            {
                Write-Verbose -Message ($localized.EnumeratedScriptOutputIsValid)
                $scriptOutput -split "(`r)?`n" | ForEach-Object {
                    Write-Verbose -Message " $_"
                }
            }
            else
            {
                $isCompliant = $false
                Write-Verbose -Message ($localized.EnumeratedScriptOutputIsNotValid)
            }

            if ($DetectionRule.EnforceSignatureCheck -eq $true)
            {
                Write-Verbose -Message ($localized.EnumeratingPowerShellScriptSignature -f $scriptPathItem.Name)
                $authenticodeSignature = Get-AuthenticodeSignature -FilePath $scriptPath -ErrorAction SilentlyContinue
                if (($null -eq $authenticodeSignature) -or ($authenticodeSignature.Status -ne 'Signed'))
                {
                    Write-Verbose -Message ($localized.InvalidDetectionScriptSignatureWarning -f $scriptPathItem.Name)
                    $isCompliant = $false
                }
                elseif ($authenticodeSignature.Status -eq 'Signed')
                {
                    Write-Verbose -Message ($localized.DetectionScriptSignatureIsValid -f $scriptPathItem.Name)
                }
            }
        }
        else
        {
            Write-Verbose -Message ($localized.EnumeratedPathDoesNotExist -f $scriptPath)
            $isCompliant = $false
        }

        if($isEncodedCommand)
        {
            Write-Verbose -Message ($localized.RemovingTemporaryFile -f $scriptPath)
            Remove-Item -Path $scriptPath -Force
        }

        return $isCompliant
    }
}

<#
    .SYNOPSIS
        Tests metadata whether architecture should be excluded from package name.
#>

function Test-PackageExcludeArchitecture
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformationAttribute()]
        [System.Collections.Hashtable] $Metadata
    )
    process
    {
        if ((($Metadata.Properties.ContainsKey('ExcludeArchitecture')) -and ($Metadata.Properties.ExcludeArchitecture -eq $true)))
        {
            return $true
        }
        else
        {
            return $false
        }
    }
}

<#
    .SYNOPSIS
        Tests metadata whether publisher name should be excluded.
#>

function Test-PackageExcludePublisher
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformationAttribute()]
        [System.Collections.Hashtable] $Metadata
    )
    process
    {
        if ((($Metadata.Properties.ContainsKey('ExcludePublisher')) -and ($Metadata.Properties.ExcludePublisher -eq $true)) -or
            (($Metadata.Properties.ContainsKey('ExcludePublisherName')) -and ($Metadata.Properties.ExcludePublisherName -eq $true)))
        {
            return $true
        }
        else
        {
            return $false
        }
    }
}

<#
    .SYNOPSIS
        Tests metadata whether the UWP moniker should be excluded.
#>

function Test-PackageExcludeStoreApp
{
    [CmdletBinding()]
    param
    (
        [Parameter(Mandatory, ValueFromPipeline)]
        [Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformationAttribute()]
        [System.Collections.Hashtable] $Metadata
    )
    process
    {
        if ($Metadata.Properties.ContainsKey('IsStoreApp') -and ($Metadata.Properties.IsStoreApp -eq $true))
        {
            if ($Metadata.Properties.ContainsKey('ExcludeStoreApp') -and ($Metadata.Properties.ExcludeStoreApp -eq $true))
            {
                return $true
            }
            else
            {
                return $false
            }
        }
        else
        {
            ## Not a store app so always exclude
            return $true
        }
    }
}


# SIG # Begin signature block
# MIIuwQYJKoZIhvcNAQcCoIIusjCCLq4CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCqb5bqWRW8EkLe
# 3jwx2fhd8kPxJdn2i3x/TLdUr8FnXaCCE6QwggWQMIIDeKADAgECAhAFmxtXno4h
# MuI5B72nd3VcMA0GCSqGSIb3DQEBDAUAMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
# BAMTGERpZ2lDZXJ0IFRydXN0ZWQgUm9vdCBHNDAeFw0xMzA4MDExMj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