This gist has been migrated to a real repository: https://github.com/wolever/openssl-x509-scripts
This file contains hidden or 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
| <# | |
| .Synopsis | |
| Retrieves a token object from the Azure OAUTH2 service without launching a credentials window. | |
| .DESCRIPTION | |
| Retrieves a token object that can later be used to authorise requests against the Microsoft Azure Resource Manager REST API. | |
| .EXAMPLE | |
| Get-AzureOauth2Token -username 'aad.user@mydomain.onmicrosoft.com' -password 'P2ssw0rd' | |
| #> | |
| Function Get-AzureOauth2Token | |
| { |