This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Logs to extract from server | |
| $logArray = @("System","Security","Application", "Setup") | |
| # Grabs the server name to append to the log file extraction | |
| $servername = $env:computername | |
| # Provide the path with ending "\" to store the log file extraction. | |
| $destinationpath = "C:\WindowsEventLogs\" | |
| # Checks the last character of the destination path. If it does not end in '\' it adds one. |