O'Reilly logo

Mastering PowerCLI by Sajal Debnath

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing provisioned resources

In this section, we will discuss how to manage provisioned resources. To get a list of all provisioned resources, we can use the following command. Note the page number and limit parameter, and change them according to your requirements:

PS C:\> (Invoke-RestMethod -Method Get -Uri 
"https://vra.lab.com/catalog-
service/api/consumer/resources/?page=1&limit=20" -Headers 
$headers).Content | ConvertTo-Json

Part of the output is provided here:

{ "@type": "CatalogResource", "id": "4998df9f-1ada-4cdb-843c-a7d61a256e94", "iconId": "bda84bcb-d3f6-4332-8781-89d146ef5e28", "resourceTypeRef": { "id": "Infrastructure.Virtual", "label": "Virtual Machine" }, "name": "vc-01", "description": "TEST machine", "status": "ACTIVE", "catalogItem": ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required