Skip to content

Instantly share code, notes, and snippets.

@davespanton
Last active May 20, 2017 20:47
Show Gist options
  • Save davespanton/41cdf428e60e860207879d3a01061137 to your computer and use it in GitHub Desktop.
Save davespanton/41cdf428e60e860207879d3a01061137 to your computer and use it in GitHub Desktop.
Copy a yubioath mfa token to the clipboard.
(yubioath | select-string -pattern "XXXX").ToString() | select-string -pattern "[0-9]{6}$" | %{$_.Matc
hes} | %{$_.Value} | clip
(yubioath | select-string -pattern "2318").ToString() | select-string -pattern "[0-9]{6}$" | %{$_.Matches} | %{$_.Value}
| Out-File -Encoding ASCII 'C:\Users\Dave\VMShare\.mfa'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment