Skip to content

Instantly share code, notes, and snippets.

@art0rz
art0rz / moo.ps1
Last active March 5, 2019 18:49
moo.ps1
function Get-OSProp($Class, $Prop) {
$value = (Get-WmiObject -Class $class | select-object -expand $Prop)
return $value;
}
# copy and pasted this from somewhere
function Format-TimeSpan {
process {
"{0:00} d {1:00} h {2:00} m {3:00} s" -f $_.Days, $_.Hours, $_.Minutes, $_.Seconds
}