-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Get-Uptime.ps1 #14
Comments
`Function Get-Uptime {
}` |
I went ahead and added to @Adhdmatt Get-UpTime Script. Mainly to grab the properties and put them in an object. I also added the functionality to be able to input an array of computers.
|
WMI cmdlets are deprecated. Shouldn't this use CIM cmdlets instead? |
You are correct, and using CIM returns DateTime objects instead of file time, so no weird conversion code is needed. Fixed in 8abc422 |
After testing, this appears functional |
The problem with cim cmdlets are that it also requires WinRM do be running. Try running this on a client computer or a Windows 2008 server. You'll notice you get errors because WinRM is not enabled by default. |
WinRM isn't needed for CIM. It's needed to remotely invoke it, but not for CIM itself. I've used CIM on many machines that aren't properly configured for WinRM |
Function to read in a simple list file and generate an uptime report object that can be piped into Export-CSV or Out-GridView
Idea Credit: Reddit user /u/OttoVonMonstertruck
The text was updated successfully, but these errors were encountered: