This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function New-Credential{ | |
$counter = 0 | |
$more = $true | |
while($more){ | |
if($counter -ge 3){ | |
Write-Warning -Message ('Take a deep breath and perhaps a break. You have entered your password {0} times incorrectly' -f $counter) | |
Write-Warning -Message ('Please wait until {0} to try again to avoid risking locking yourself out.' -f $((Get-Date).AddMinutes(+15).ToShortTimeString())) | |
Start-Sleep -Seconds 30 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function join($path) | |
{ | |
$files = Get-ChildItem -Path "$path.*.part" | Sort-Object -Property @{Expression={ | |
$shortName = [System.IO.Path]::GetFileNameWithoutExtension($_.Name) | |
$extension = [System.IO.Path]::GetExtension($shortName) | |
if ($extension -ne $null -and $extension -ne '') | |
{ | |
$extension = $extension.Substring(1) | |
} | |
[System.Convert]::ToInt32($extension) |