+ Post New Thread
Results 1 to 2 of 2
Windows Server 2008 R2 Thread, Software version checker in Powershell in Technical; Hello Guys, I'm currently messing about with PowerShell, trying to make our lives easier with diagnosing problems on the network. ...
  1. #1

    Join Date
    Nov 2011
    Location
    In the server room... cursing like a madman
    Posts
    32
    Thank Post
    11
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Software version checker in Powershell

    Hello Guys,

    I'm currently messing about with PowerShell, trying to make our lives easier with diagnosing problems on the network. One idea I had was to develop a script that would check remote machines to see what version of Adobe Flash Player and Java they had installed and compare this with the latest version available on the web. Has anyone attempted to create a PowerShell script that does this or know of one that accomplishes this?

    Many thanks.

  2. #2


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,123
    Thank Post
    203
    Thanked 2,388 Times in 1,768 Posts
    Rep Power
    703
    Quote Originally Posted by JMBates View Post
    Has anyone attempted to create a PowerShell script that does this or know of one that accomplishes this?
    Not sure if you still need it, but I came across this script for Java today.

    Code:
    Workflow Get-Java7Version {
    
        [cmdletbinding()]
    
        param(
    
            [psobject[]]$Computers
        )
    
        foreach -parallel ($computer in $computers) {
    
            Write-Verbose -Message "Running against $($computer.Name)"
    
            # Check each computer for the info.
    
            $versions = Get-WmiObject -Class CIM_Datafile `
    
            -Filter '(Name="C:\\Program Files\\Java\\jre7\\bin\\java.dll" OR Name="C:\\Program Files (x86)\\Java\\jre7\\bin\\java.dll")' `
    
            -PSComputerName $computer.ipv4address -ErrorAction SilentlyContinue | Select-Object -Property Name,Version
    
            if ($versions){
    
                # Process each version found
    
                Write-Verbose -Message "Java found on $($computer.Name)"
    
                foreach($version in $versions){
    
                    # Create a Custom PSObject with the info to process
    
                    $found = InlineScript {
    
                        New-Object –TypeName PSObject –Prop @{'Computer'=$Using:computer.Name;
    
                        'IPv4Address'=$Using:computer.ipv4address;
    
                        'File'=$Using:version.name;
    
                        'Version'=$Using:version.version}
    
                    }
    
                    # Return the custom object
    
                    $found
    
                }
    
            }
    
            else {
    
                Write-Verbose -Message "Java not found in $($computer.Name)"
    
            }
    
        }
    
    }
    Code:
    Import-Module ActiveDirectory
    
    $computers = Get-ADComputer -Filter * -Properties Name,OperatingSystem,IPv4Address | Select-Object Name,IPv4Address
    
    Get-Java7Version -Computers $computers -Verbose | Select Computer,IPv4Address,Version,File | Out-GridView

  3. Thanks to Arthur from:

    psydii (27th January 2013)

SHARE:
+ Post New Thread

Similar Threads

  1. Help!! No Previous Versions tab in the folders properties
    By gloriousglenn in forum Windows Server 2000/2003
    Replies: 5
    Last Post: 14th December 2012, 07:02 PM
  2. [MS Office - XP] Disabling spell checker in Word??????
    By rusty155 in forum Office Software
    Replies: 43
    Last Post: 21st October 2011, 03:25 PM
  3. [MS Office - 2003] Software to Scan in Documents that can be edited in Word 2003
    By elsiegee40 in forum Office Software
    Replies: 1
    Last Post: 7th July 2009, 02:55 AM
  4. software via autoit in AD
    By chrbb in forum Windows
    Replies: 6
    Last Post: 14th November 2007, 08:15 AM
  5. Software What Is In Your Kit
    By russdev in forum General Chat
    Replies: 17
    Last Post: 6th July 2005, 09:25 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •