AppMgt/Get-NCHCustomNAVApps.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function Get-NCHCustomNAVApps {
    <#
    .SYNOPSIS
    Gets all non-Microsoft Apps from a Container
     
    .PARAMETER ContainerName
    The Container
     
    .EXAMPLE
    Get-NCHCustomNAVApps `
        -ContainerName $Containername
    #>

    param(
        [Parameter(Mandatory = $true)]
        [String] $ContainerName
    )

    Write-Host -ForegroundColor Green "$($MyInvocation.MyCommand.Name) on $env:COMPUTERNAME"

    $Session = Get-NavContainerSession -containerName $ContainerName
    Invoke-Command -Session $Session -ScriptBlock {
   
        Return Get-NAVAppInfo -ServerInstance NAV | Where Publisher -ne 'Microsoft'
    }   
}