$obj | Add-Member -MemberType NoteProperty -Name "Publisher" -Value $($thisSubKey.GetValue("Publisher")) $obj | Add-Member -MemberType NoteProperty -Name "InstallLocation" -Value $($thisSubKey.GetValue("InstallLocation")) $obj | Add-Member -MemberType NoteProperty -Name "DisplayVersion" -Value $($thisSubKey.GetValue("DisplayVersion")) $obj | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value $($thisSubKey.GetValue("DisplayName")) $obj | Add-Member -MemberType NoteProperty -Name "ComputerName" -Value $env:COMPUTERNAME #Open each Subkey and use GetValue Method to return the required values for each #Retrieve an array of string that contain all the subkey names #Drill down into the Uninstall key using the OpenSubKey Method $reg=::OpenRemoteBaseKey('LocalMachine', $env:COMPUTERNAME) #Create an instance of the Registry Object and open the HKLM base key $UninstallKey="SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall" $array = the variable to hold the location of Currently Installed Programs # Check and report if an update is required for each entry found #$sqlodbc = Get-WmiObject -Class Win32reg_AddRemovePrograms | Where-Object | Select DisplayName,DisplayVersion # Fetch the different MS SQL ODBC installations found on the machine Write-Host $cli.DisplayName "with version" $cli.DisplayVersion " supports TLS 1.2" -ForegroundColor Green
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |