I have been having problem with a computer with random reboots, and hanging on restart. I wanted to know how long the computer had been unavailable. I decided to use System Event ID 12 as the startup event for the purposes of my calculations. The script takes these steps: 1) connect to the remote system and get the oldest event from the System Log. Use this as the earliest start date for queries. 2) Collect all the startup events from user selected date. 3) For each startup event, collect the event immediately previous by record number. 4) Calculate the difference.Script Text
All the scripts are saved as .txt files. Newer files have a "View Script" button which will let you save or open a script in notepad. For earlier posts, the easiest way to download with IE is to right click on the link and use "Save Target As". Rename file from Name_ext.txt to Name.ext.
To see a full post after searching, please click on the title.
PowerShell Scripts were written with Version 3 or 4.
https connections are supported.
All new users accounts must be approved, as are comments. Please be patient. It is pretty easy to figure out my email address from the scripts, and you are welcome to contact me that way.
Top Posts & Pages
- Remove DNS Host Record and PTR with PowerShell
- Create Import file for Remote Desktop Connection Manager 2.7
- Get the Parent OU for an AD Object
- Fixing SCCM 1603 Errors
- Get User's Email Address from SmartCard with PowerShell
- Export and Import Delegated OU Permissions with PowerShell
- Export DNS Server Records with PowerShell
- Convert System.DirectoryServices.SearchResult to a PSObject
- PowerShell:Start RDP After Reboot
- Auditing Active Directory Permissions with Powershell