soc/api/v1/addons/New-Addon.ps1
function Add-Addon { [CmdletBinding(SupportsShouldProcess)] param( [Parameter(Mandatory)] [string] $AddonAlias, [Parameter(Mandatory)] [string] $FilePath ) if ($PSCmdlet.ShouldProcess($AddonAlias)) { return Invoke-Api Post "/soc/api/v1/addons" -JsonBody @{ "alias" = $AddonAlias "contents" = [Convert]::ToBase64String([IO.File]::ReadAllBytes($(Resolve-Path $FilePath))) } } } |