Skip to content

Instantly share code, notes, and snippets.

@Nillth
Nillth / New-Credential.ps1
Created December 6, 2021 22:39 — forked from evetsleep/New-Credential.ps1
New-Credential
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
}
@Nillth
Nillth / join.ps1
Created March 22, 2019 05:16 — forked from jehugaleahsa/join.ps1
PowerShell Script to Split Large Files
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)