Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###################### SHOW LOG FOR LAST X MINUTES
- Function Get-SPLogEventLast([int]$minutes) {
- [int]$min = 5
- if($minutes -ne $null) { $min = $minutes }
- $title = "ULS for last $($min) minutes"
- $tim = (Get-Date).AddMinutes(-1*$min)
- Get-SPLogEvent -StartTime $tim|Select Timestamp,Area,Category,EventID,Level,Correlation,Message|Out-GridView -Title $title
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement