Skip to content

Instantly share code, notes, and snippets.

View mcc85s's full-sized avatar
💭
Keeping it real and simple.

Michael C Cook Sr. mcc85s

💭
Keeping it real and simple.
  • Secure Digits Plus LLC
  • 201D Halfmoon Circle, Clifton Park NY
View GitHub Profile
$Account = "admin"
$Key = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList"
$Split = @( )
ForEach ($Node in $Key -Split "\\")
{
$Split += $Node
$Path = $Split -join "\"
If (!(Test-Path $Path))
{
New-Item $Path -ItemType Directory -Verbose
# // ================================================================================================================
# // | This script creates a time object similar to the [System.Diagnostics.Stopwatch] object, but is much simpler. |
# // ================================================================================================================
# [Script area]
# Overload class definition
Class Time
{
Hidden [Object] $Start
Time()
# Name -> [list cmdlet parameters alias - powershell]
# Link -> https://www.youtube.com/watch?v=z79w4cmhius
# Updated *slightly*...
$CommandName = Read-Host "Type command name"
(Get-Command $CommandName).Parameters.Values | Select-Object Name, Aliases
Class PercentProgress
{
[DateTime] $Start
[DateTime] $Now
[DateTime] $End
[Float] $Percent
[TimeSpan] $Elapsed
[TimeSpan] $Remain
[TimeSpan] $Total
PercentProgress([String]$Start)