How to check if I have a list of SQL Servers in a .TXT file and in the list, what are the SQL Servers are not accessible/stopped/not working?$MachineList = get-content "C:\PS\list_server.txt";$MachineList.Countforeach ($Machine in $MachineList){#Run ping test$MachineName = $Machine$result = Get-WMIObject -query “select StatusCode from Win32_PingStatus where Address = ‘$MachineName’” }The above query is throwing error....
↧