Skip to content

Instantly share code, notes, and snippets.

@trackd
Created February 8, 2024 00:02
Show Gist options
  • Save trackd/1ea84d176bc580f3ccad3d74d2f71230 to your computer and use it in GitHub Desktop.
Save trackd/1ea84d176bc580f3ccad3d74d2f71230 to your computer and use it in GitHub Desktop.
function Get-PowershellDLEHint {
$iwr = (Invoke-WebRequest 'https://powershelldle.com/').Content
$strings = ($iwr | Select-String -Pattern '<div id="answer-char" class="(relative bottom-1)?">\s*[_-]\s*</div>' -AllMatches).Matches.Value
$verb, $noun = ($strings -replace '<[^>]+>').Trim() -join '' -split '-'
Get-Command | Where-Object { $_.Verb.Length -eq $verb.length -And $_.Noun.Length -eq $noun.length }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment