For ISE Steroids
This file contains 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
| ## Displays a Message Box | |
| Add-Type -AssemblyName PresentationFramework | |
| [System.Windows.MessageBox]::Show('Checking App Log Files Complete','App Logs','OK','Information') |
This file contains 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
| ## Define the log file | |
| $logDir = 'c:\temp' | |
| $logFile = "$logDir\AppLog_$(Get-Date -format 'yyyy-mm-dd_hh-mm-ss-tt').xml" | |
| ## Get the ten latest application log events and export as an XML file | |
| Get-WinEvent -LogName application -MaxEvents 10 | Out-File $logFile -Force | |
| ## Call AppLogsComplete.ps1 | |
| try{ & $PSScriptRoot\AppLogsComplete.ps1 } catch{ exit } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment