Jump to content
Welcome to our new Citrix community!

Can anyone provide a Powershell example to create machine catalog with DaaS rest API?

Recommended Posts

# Create New MC

function CreateMachineCatalog {

  param (


    [string] $customerid,


    [string] $siteid,


    [string] $bearerToken,

#    [Parameter(Mandatory=$true)]

#    [string] $adminCredential,


    [string] $body


  $requestUri = "https://api-eu.cloud.com/cvad/manage/MachineCatalogs"

  $headers = @{

    "Accept" = "application/json";


    "Authorization" = "CWSAuth Bearer=$bearerToken";

    "Citrix-CustomerId" = $customerid;

    "Citrix-InstanceId" = $siteid;

    # "X-AdminCredential" = "Basic $adminCredential";


 $response = Invoke-RestMethod -Uri $requestUri -Method POST -Headers $headers -Body $body 

 return $response


$adminCredential = ""

$body = @"


  "MachineType": "Virtual",

  "Name": "MOBIZ-TEST-MC-001",

  "AllocationType": "Static",

  "IsRemotePC": false,

  "MinimumFunctionalLevel": "L7_9",

  "ProvisioningScheme": {

    "MasterImagePath": "image.folder/........",


  "PersistUserChanges": "Discard",

  "ProvisioningType": "MCS",

  "SessionSupport": "MultiSession"



$response = CreateMachineCatalog $Customer_id $SiteID $BearerToken $body

The response shows an error:Invoke-RestMethod : {"ErrorMessage":"The required parameter is not specified.rnParameter name: 


But I have MachineType parameter there as you can see above. Any help would be appreciated.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...