Not all software but most of installed. Just add filter ' Get-WmiObject -Class 
Win32_Product | Where-Object { $_.Name -like 'vagrant*' } | Select-Object 
Name, Version'

Chrome is specific, and in this case you can use:
- ansible.windows.win_shell: 
'[System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\Program Files 
(x86)\Google\Chrome\Application\chrome.exe").FileVersion'
пятница, 21 января 2022 г. в 23:51:00 UTC+3, [email protected]: 

> Would I be able to specify a specific program/application, such as Google 
> Chrome for example, using that?
>
> Thanks,
> Harry
>
> On Friday, January 21, 2022 at 3:41:10 PM UTC-5 [email protected] 
> wrote:
>
>> you need something like this:
>> - ansible.windows.win_shell: 'Get-WmiObject -Class Win32_Product | 
>> Select-Object Name, Version'
>> пятница, 21 января 2022 г. в 19:22:46 UTC+3, [email protected]: 
>>
>>> Occassionally, at my office, we get security alerts for 
>>> vulnerabilities.  I have a playbook that will get run "rpm -q" on the 
>>> package name and it returns the version installed.  For example, 
>>> google-chrome-stable.
>>>
>>> How can I accomplish this on our Windows servers?  I have Ansible 
>>> working for them and have done basic stuff such as win_ping, win_command, 
>>> etc.  But I'd like to be able to check the software versions without using 
>>> RDP to connect to each server and check the version manually.
>>>
>>> Thanks for any thoughts,
>>> Harry
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/886dd45e-08e3-4bd5-b8a1-ba090a450f31n%40googlegroups.com.

Reply via email to