Skip to content

Instantly share code, notes, and snippets.

@Graham-Beer
Created April 23, 2018 15:12
Show Gist options
  • Save Graham-Beer/02c29fefc5e0653a7c6aed4ed4f9aa83 to your computer and use it in GitHub Desktop.
Save Graham-Beer/02c29fefc5e0653a7c6aed4ed4f9aa83 to your computer and use it in GitHub Desktop.
Little function to make use of 'Dinopass' api
filter Get-DinoPW {
param (
[Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)]
[ValidateSet('Simple', 'Strong')]
$SetPwStrength
)
$uri = switch ($SetPwStrength) {
'Simple' { 'http://www.dinopass.com/password/simple' }
'Strong' { 'http://www.dinopass.com/password/strong' }
}
try {
Invoke-RestMethod -Uri $uri
}
catch {
Throw $_
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment