Last active
May 20, 2017 20:47
-
-
Save davespanton/41cdf428e60e860207879d3a01061137 to your computer and use it in GitHub Desktop.
Copy a yubioath mfa token to the clipboard.
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
(yubioath | select-string -pattern "XXXX").ToString() | select-string -pattern "[0-9]{6}$" | %{$_.Matc | |
hes} | %{$_.Value} | clip |
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
(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