Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

detect x32 system

$
0
0

Hi

I have this script but I need to modify it to display data if the system is x32.


ForEach ($system in (Get-Content C:\computers.txt)) {
    # It's easier to have file path in a variable
    $dll = "\\$system\c`$\Windows\SysWOW64\file.dll"

    # Is the DLL there?    
    if  ( Test-Path  $dll){
        # Yup, get the version info
        $ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($dll).FileVersion
        # Write file path and version into a file.  
        Add-Content -path C:\results.csv "$dll,$ver"
    }
}


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>