Send-MailMessage -To $recipient -From -Subject "Log files from Company" -Body "Attached are the log files from the IIS application for your review" -SmtpServer -Attachments "c:\wwwroot\logs\$zipfile. Now open the Eden Editor and open the mission. function collect-iislogĬompress-Archive -Path "c:\wwwroot\logs" -DestinationPath "c:\wwwroot\logs\$sipfile.zip" To import the files select the necessary files and copy them (ctrl c) Now paste these into your profiles missions folder, located usually (Insert drive letter):Users (user)DocumentsArma 3 - Other Profiles (Insert Arma username)missions. Instead, he is going to use PowerShell to script the entire process and have everything sent off to support at the scheduled time. Since the application is in production and is running on a server that is heavily used, trying to amass the log files while the system is busy is not something John wants to do. Suppose John is a system administrator trying to work through a problem with a set of log files from an IIS application and needs to send the files to the application vendor for further research. In the example above, the new folder would then be "iislogs." A usage example ^ Note that if you omit the -DestinationPath parameter, PowerShell will automatically create a new folder using the name of the zip archive. Expanding compressed files using PowerShell and the Expand-Archive cmdlet
0 Comments
Leave a Reply. |