Home > PowerShell Scripting > Retrieve adobe flash version with PowerShell

Retrieve adobe flash version with PowerShell

Just a quick powershell script to start the year.

I recently needed to audit the version of adobe flash on the machines a script was running. This code was originally written for visual studio but translates well to powershell.

to retrieve the version of adobe flash on the local machine, use get-adobeflashversion. The code for the get-adobeflashversion can be found below:

function get-adobeflashversion{
    try{
        $flashobject = new-object -ComObject "shockwaveflash.shockwaveflash"
        $version=(($flashobject.getvariable("`$version")).replace(",",".")).trimstart("WIN ")
    }
    Catch{
        write-warning "Could not create Com Object, are you sure Adobe Flash is installed?"
    }
    return $version
}
About these ads
  1. Derek Que
    May 15, 2012 at 2:51 pm

    Thanks for this but is it the adobe or macromedia check?

    • May 18, 2012 at 5:01 pm

      They are the same thing, adobe bought macro media and haven’t renamed the com object.

  2. Dean132
    February 27, 2013 at 2:15 pm

    Hi this is great thanks very much, how do I get this to run against a list of computers, when I try this

    Get-Content C:\AdobeUpdate\flashservers.txt | get-adobeflashversion

    it only returns the flash version on the local computer rather than all those in the txt file

    • February 28, 2013 at 12:28 pm

      That’s complicated, first you would have to change the function to accept an array, then you would need to use remoting to open a session with the remote computer and send the flash version back to the local client.

      A

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 2,300 other followers

%d bloggers like this: