PIVPosh is a Powershell integration of the Pivotal (Download) API it allows you to Dynamically retrieve content from Pivotal Network
PIVPosh is available from the Powershell Gallery.
Install the Module with Install-Module command.
Install-Module PIVPosh -Scope CurrentUser -Force
ipmo .\PIVPosh
Get-Command -Module PIVPosh
Get-PIVSlug
this is a dynamic commandlet, i.e. it will online parse valid values for the Name Parameter
Get-PIVSlug -Name 'Pivotal Container Service (PKS)'
to retrieve files or accept EULAS´s, you need to have an access token. the access token can be retrieved by using the refresh token from your pivotal network account
once retrieved your refresh token, retrieve an access token:
$token = Get-PIVaccesstoken -refresh_token XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-r
Get-PIVSlug -Name 'Pivotal Cloud Foundry Operations Manager' | Get-PIVRelease | where version -ge 2.2
in the below example, the commands download specific stemcell´s for Azure / AzureStack
foreach ($version in '3586.26','3541.36','3445.54') {Get-PIVSlug -Name 'Stemcells for PCF' | Get-PIVRelease | where version -match $version | Get-PIVFileReleaseId | where name -match hyperv | Get-PIVFilebyReleaseObject -access_token $token}
Get-PIVSlug -Name 'Pivotal Cloud Foundry Operations Manager' | Get-PIVRelease | where version -ge 2.2 | Get-PIVFileReleaseId | where name -match azure | Get-PIVFilebyReleaseObject -access_token $token