![]() ![]() Not even sure it would work anyhow.Īlso, in my txt file which contains the machine names, how should I list them? A machine name per line or seperated with comma etc?Īny advice would be very much appreciated. The Export-CSV cmdlet converts the resulting PowerShell object to a comma-separated list of strings and saves the strings to the specified file. I'm not sure what to put after -computername and ?.csv. For example, one file might list critical servers, and another list might list moderately critical servers. Use the :: syntax to run the workflow commands within your YAML file these commands. One advantage of reading a text file is that multiple text files can be used. New-Item cmdlet is used to create a text file and Set-Content cmdlet to put content into it. Note: Workflow command and parameter names are not case-sensitive. Get-EventLog application -computername MACHINE1| where The Get-Content Windows PowerShell cmdlet retrieves the list of computer names from the text file, and converts the text into an array of computer names. This is the cmd I use to output the remote event viewer for 1 machine (this works): 1) read list of machines stored in a txt fileĢ) export each machine's 'applciation', 'error' from event viewer ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |