Skip to content

Instantly share code, notes, and snippets.

@winadm
Created January 30, 2020 07:10
Show Gist options
  • Save winadm/65cca339513c799c71390afad21b28d2 to your computer and use it in GitHub Desktop.
Save winadm/65cca339513c799c71390afad21b28d2 to your computer and use it in GitHub Desktop.
# PowerShell скрипт для проверки верси Java SE (JRE) на удаленных компьютерах/серверах
# Подробности в статье на https://winitpro.ru/
# Проверить версию Java по списку компьютеров
# $computers = @('sever1,server2,server3')
# Проверить версию Java по списоку серверов в текстовом файле
#$computers=Get-content C:\PS\ServerList.txt
# Получить версию Java на всех серверах домена
$computers = ((get-adcomputer -Filter { enabled -eq "true" -and OperatingSystem -Like '*Windows Server*' }).name).tostring()
Get-WmiObject -Class Win32_Product -ComputerName $computers -Filter "Name like '%Java%' and not Name like '%Java Auto Updater%'" | Select __Server, Version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment