Created
April 27, 2018 04:18
-
-
Save rayterrill/3d31fc4a8b998804aad78fd85e61b809 to your computer and use it in GitHub Desktop.
GetGithubReposViaAPI.ps1
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
| $AuthString = '{0}:{1}' -f 'USERNAME','PASSWORD' | |
| $AuthBytes = [System.Text.Encoding]::Ascii.GetBytes($AuthString) | |
| $global:BasicCreds = [Convert]::ToBase64String($AuthBytes) | |
| $content = invoke-webrequest https://api.github.com/orgs/PortofPortland/repos?type=All -Headers @{"Authorization"="Basic $BasicCreds"} | |
| $content.Content | ConvertFrom-JSON |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment