(Beginner) Powershell - getting machine names from a text file and run queries, functions and conditions


so have managed understand powershell beginner perspective. know best way gather pc names text file , perform queries, functions , conditions.

but need way concistant can want information on. need way export information , categorize data's output presentable , wont spacing issues

 

thanks:)

hi neojc,

just on way, little example script list of computer names, , run get-eventlog cmdlet on each one, export results csv file can open in excel:

  $computernames = get-content -path "c:\scripts\computernames.txt" get-eventlog -computername $computernames -logname application -newest 10 | export-csv -path "c:\scripts\appevents.csv"   


if found post helpful, please give "helpful" vote. if answered question, remember mark "answer".


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Group Policy Event ID 1058 Error Code 1326 (The user name or password is incorrect)

Suspicious event log Event ID: 4905

DCOM received error "2147746132" from...