Copy and Paste this to See Result(s): $computername=$env:computername $limitEventsCount=40000 $daysSearchLimit=30 function getWindowsShutdownReason{ param( $computername=$env:computername, $limitEventsCount=10000,…