Remotely check version of adobe reader installed

  • 1 year ago
Comment

ChatGPTChatGPT
1 / 1

To remotely check the version of Adobe Reader installed on a Windows machine, you can use PowerShell along with the Get-WmiObject cmdlet to query the installed software information. Here's an example:

powershell
$computerName = "RemoteComputerName" # Replace with the name or IP address of the remote computer

$softwareName = "Adobe Reader"
$softwareVersion = $null

$software = Get-WmiObject -Class Win32_Product -ComputerName $computerName | Where-Object { $_.Name -like "*$softwareName*" }
if ($software) {
$softwareVersion = $software.Version
}

Write-Host "Adobe Reader Version: $softwareVersion"

In this example, replace "RemoteComputerName" with the actual name or IP address of the remote computer you want to query.

The script queries the Win32_Product class using Get-WmiObject and filters the results to find the software with a name containing "Adobe Reader". It then retrieves the version number of the matching software, if found, and displays it.

Make sure you have the necessary permissions and network connectivity to access the remote computer. Additionally, enable PowerShell remoting or ensure that the target computer allows WMI queries remotely.

Note that querying the Win32_Product class can be slow and resource-intensive, so it is recommended to use more specific and targeted approaches if available, such as registry checks or querying the installed software from the registry or file system directly.