I have a PC inventory SQL database that I am accessing in PS and I want to be able to search the SQL query results. I am able to run the SQL query which writes the results to $PCTableInventory and I am able to filter those results more with the code below:
#Textbox with the search criteria $PCInventorySearch = $textboxPCInventorySearch.text #$PCTableInventory is the results of the original SQL query. $PCInventoryResults = $PCInventoryTable | where { ($_.lastloggedin -like "*$PCInventorySearch*") -or ($_.Name -like "*$PCInventorySearch*") -or ($_.Manufacturer -like "*$PCInventorySearch*") -or ($_.Model -like "*$PCInventorySearch*") | select Name
This all works fine but what I was hoping to do was search all the properties or columns without having to specify each one.
Thanks,
Scott