Skip to content

Instantly share code, notes, and snippets.

@dfinke
Created March 28, 2019 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dfinke/4ff7b7011037a40f385df6f3a3041592 to your computer and use it in GitHub Desktop.
Save dfinke/4ff7b7011037a40f385df6f3a3041592 to your computer and use it in GitHub Desktop.
Wrapper for azx
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