I hereby claim:
- I am Xplantefeve on github.
- I am xplantefeve (https://keybase.io/xplantefeve) on keybase.
- I have a public key whose fingerprint is BBA5 AAF0 DC6E 481C 091E A57D 8230 1914 C28F 3C6E
To claim this, I am signing this object:
Topic: NBA All Stars | |
Owners: Foo Owners | |
Users: User 1 | |
Users: User 2 | |
Topic: NFL MVPs | |
Owners: Bar Owners | |
Users: Tony Stark | |
Users: Mitch Hedberg | |
Users: Someone Else | |
Topic: NBA MVPs |
function Get-FolderSizeRC($Path) { | |
if ( robocopy $Path c:\dummy /e /r:0 /w:0 /b /BYTES /nfl /ndl /np /njh /l | ? { $_ -match 'Bytes :\s*(?<size>\S+)' } ) { return [int64]$Matches.size } | |
} | |
function Get-FolderSizePS($Path) { | |
return ( ls -Recurse -Path $Path -Force | measure -Property length -Sum ) | select -ExpandProperty Sum | |
} | |
function test($Path) { | |
Write-Host -Object "Testing $Path" -ForegroundColor Cyan |
#region ExcelFunctions | |
function Get-NormalizedPath ( $Path ) { | |
if ( ( Split-Path $Path ) -match '^(\.|)$' ) { | |
$Path = Join-Path -Path ( Get-Location ) -ChildPath ( Split-Path -Path $Path -Leaf ) | |
} | |
return $Path | |
} | |
$MethodImportCSVtoSheet = { |
<# | |
MIT License | |
Copyright (c) 2016 Xavier Plantefeve | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
MIT License | |
Copyright (c) 2016 Xavier Plantefeve | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
<# | |
.Synopsis | |
Creates a timer with display | |
.DESCRIPTION | |
Creates a timer that writes the progress of the current action and the estimated remaining time. | |
Suppose you have $Items, an array of items to process. | |
First, you create a timer initialized to the number of items in the array: | |
$MyTimer = New-Timer -TotalItems $Items.count -Activity 'Processing items' |
# Answer to http://powershell.org/wp/2016/03/05/2016-march-scripting-games-puzzle/ | |
Function Get-HumanReadableSize($size) { | |
If ( $size -lt 1KB) { Return $size } | |
ElseIf ( $size -lt 1MB) { Return "$([math]::Round(($size / 1KB),2))Kb" } | |
ElseIf ( $size -lt 1GB) { Return "$([math]::Round(($size / 1MB),2))Mb" } | |
ElseIf ( $size -lt 1TB) { Return "$([math]::Round(($size / 1MB),2))Gb" } | |
Else { Return "$([math]::Round(($size / 1TB),2)) TB" } | |
} |
I hereby claim:
To claim this, I am signing this object:
<# | |
.Synopsis | |
Short description | |
.DESCRIPTION | |
Long description | |
.EXAMPLE | |
Example of how to use this cmdlet | |
.EXAMPLE | |
Another example of how to use this cmdlet | |
#> |
<# | |
.Synopsis | |
Gets uptime information | |
.EXAMPLE | |
Get-Uptime -ComputerName URANUS | |
.INPUTS | |
String[] | |
.OUTPUTS | |
CUSTOM.UptimeInfo | |
.NOTES |