Created
March 28, 2019 22:34
-
-
Save dfinke/4ff7b7011037a40f385df6f3a3041592 to your computer and use it in GitHub Desktop.
Wrapper for azx
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
function Get-AZX { | |
param($name = "*") | |
$r = (Invoke-RestMethod "https://azx.ms/api/list") -split "`n" | |
$list = $r[5..$($r.count - 5)] | |
$list | | |
ConvertFrom-Csv -Delimiter "|" -Header 'Name', 'Description' | | |
Where-Object {$_.Name -like $Name} | |
} | |
function Get-AZXContent { | |
param( | |
[Parameter(ValueFromPipelineByPropertyName)] | |
$Name | |
) | |
Process { | |
Invoke-RestMethod "https://azx.ms/api/$($name)" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment