Skip to content
Menu
The Lonely Administrator
  • PowerShell Tips & Tricks
  • Books & Training
  • Essential PowerShell Learning Resources
  • Privacy Policy
  • About Me
The Lonely Administrator

My Uptime PowerShell Module Published to GitHub

Posted on September 29, 2015September 29, 2015

Earlier this year I wrote a PowerShell module to get uptime information. The module was part of a series I wrote for Petri.com. As part of my ongoing project to move some of my more interesting, and hopefully useful, tools to GitHub, I revised the module. The new version makes better use of custom format and type extensions, including the addition of several methods.

Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial

Exclusive offer on ADManager Plus for US and UK regions. Claim now!

You can also now use a CIMSession instead of a computername and the results are "live". Because I defined some script properties, uptime values are updated every time you view the object. I will be writing about the changes in more detail on Petri.com. But for now, you can find the module on GitHub. I hope you'll let me know what you think and what would make it even better.


Behind the PowerShell Pipeline

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to print (Opens in new window) Print
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...

Related

4 thoughts on “My Uptime PowerShell Module Published to GitHub”

  1. Tim Bolton says:
    September 30, 2015 at 1:19 pm

    “The command uses the CIM cmdlets so any remote computer must be running at least PowerShell 3.0 with remoting enabled”
    What about forcing the session to use the DCOM protocol? That way you can hit older OS’s regardless of PowerShell Version..?

    1. Jeffery Hicks says:
      September 30, 2015 at 1:51 pm

      I didn’t want to get bogged down with code for legacy systems that soon should go away. The alternative is to first create CIMSessions with appropriate options and then pipe those sessions to the command.

    2. Jeffery Hicks says:
      September 30, 2015 at 1:54 pm

      Actually, you can’t pipe CIMSessions right now. You have to do this: get-myuptime -CimSession (get-cimsession)

      I should modify the command.

    3. Jeffery Hicks says:
      October 5, 2015 at 7:30 pm

      The latest version on GitHub now lets you pipe CIMSessions to Get-MyUptime.

Comments are closed.

reports

Powered by Buttondown.

Join me on Mastodon

The PowerShell Practice Primer
Learn PowerShell in a Month of Lunches Fourth edition


Get More PowerShell Books

Other Online Content

github



PluralSightAuthor

Active Directory ADSI Automation Backup Books CIM CLI conferences console Friday Fun FridayFun Function functions Get-WMIObject GitHub hashtable HTML Hyper-V Iron Scripter ISE Measure-Object module modules MrRoboto new-object objects Out-Gridview Pipeline PowerShell PowerShell ISE Profile prompt Registry Regular Expressions remoting SAPIEN ScriptBlock Scripting Techmentor Training VBScript WMI WPF Write-Host xml

©2025 The Lonely Administrator | Powered by SuperbThemes!
%d