Q:

Use powershell on remote machine for Edge Version

I have a script that returns Version numbers for 3rd Party software running on our Domain. Java, chrome, etc to ensure we are up to date. 
This is all working OK.
However, I am trying to use:
Get-AppxPackage -Name Microsoft.MicrosoftEdge | select-object Version

within a remote Powershell session or 'invoke-command' but it is returning no results, 
the command works fine if locally, and also when RDP'd onto the remote machine.
How can i use this cmdlet remotely to check Edge is version compliant? 
Many Thanks.
EDIT:
    import-module activedirectory

    $workstations = Get-ADComputer -Filter "OperatingSystem -like 'Windows 10 *'" -Property * | select name -ExpandProperty Name

    foreach ($workstation in $workstations)
{

$session = New-PSSession -Computername $workstation 

$resultofsession = Invoke-Command -Session $Session -ScriptBlock{

$Path="HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"       
$path2 = "HKLM:\SOFTWARE\Microsoft\Internet Explorer\"

$java = Get-ItemProperty $Path | Select-Object DisplayName, DisplayVersion | where displayname -like "java*"
$chrome =  Get-ItemProperty $path | Select-Object DisplayName, DisplayVersion | where displayname -ceq "Google Chrome"
$adobe = Get-ItemProperty $path | Select-Object DisplayName, DisplayVersion | where displayname -ceq "Adobe Acrobat Reader DC"
$edge = Get-AppxPackage -Name Microsoft.MicrosoftEdge | select-object Version
$ie = get-itemProperty $path2 

$Object = New-Object PSObject -property @{

'chrome'        = "CHROME: " + $chrome.displayversion + ","
'edge'          = "EDGE: " + $edge + ","
'ie'            = "IE: " + $ie.svcVersion + ","
'java'          = "JAVA: " + $java.Displayversion + ","
'adobe'         = "ADOBE: " + $adobe.displayversion + ","
'hostname'      = hostname

}

Write-output $object 

}

remove-pssession $session

write-output $resultofsession | format-table -HideTableHeaders -autosize -force | Out-File "C:\web\Version.txt" -append

}

A:

Get-AppxPackage will return only information for the current users profile (in this case, the account running the script). You likely need to add the -AllUsers switch, but note this will return a result for each user logged in (and they may have different versions). You can use the -user parameter to specify a specific user.
AppX packages are only updated for the user profile when they log in, hence why different users can have different versions of an app on the same workstation. Assuming everything works as expected, the app should be updated when the user next logs in.
Try the following to return the version number for each user ID:
$edge = Get-AppxPackage -AllUsers -Name Microsoft.MicrosoftEdge | select-object @{N="User"; E={$_.packageUserInformation.UserSecurityId.Username}},Version

Example output:
User     Version
----     -------
test     42.17127.1.0
S-1-5-18 44.17763.1.0
jacob    44.18252.1000.0

