Jump to content
Welcome to our new Citrix community!
  • 0

Problem Creating Azure hosted Machine Catalog with Powershell

Robert Schnöller


I have  a script based on the DesktopStudio powershell output to create a Machine Catalog

but when executing the following command I get an error.

Problem is the -CustomProperties part without this it runs through


New-ProvScheme  -AdminAddress $AdminAddress1   -CleanOnBoot -CustomProperties "<CustomProperties xmlns= "http://schemas.citrix.com/2014/xd/machinecreation " xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance "><Property xsi:type= "StringProperty " Name= "UseManagedDisks " Value= "true " /><Property xsi:type= "StringProperty " Name= "StorageAccountType " Value= "Standard_LRS " /><Property xsi:type= "StringProperty " Name= "LicenseType " Value= "Windows_Server " /></CustomProperties>" -HostingUnitName "net-we-dev-test-bmt" -IdentityPoolName "MCTest_1" -InitialBatchSizeHint 3 -LoggingId "5807d17c-5a3a-430c-adb0-516dee85a605" -MasterImageVM "XDHyp:\HostingUnits\net-we-dev-test-bmt\image.folder\rgp-d-we1-dev-test-bmt-terraform.resourcegroup\Snapshot_VD-AZMaster_200409_1144.snapshot" -NetworkMapping @{"0"="XDHyp:\HostingUnits\net-we-dev-test-bmt\\virtualprivatecloud.folder\rgp-d-we1-dev-test-bmt-networking.resourcegroup\vnet-d-we1-01.virtualprivatecloud\sub-d-we1-pubint1-"} -ProvisioningSchemeName "MCTest" -RunAsynchronously -Scope @() -SecurityGroup @() -ServiceOffering "XDHyp:\HostingUnits\net-we-dev-test-bmt\serviceoffering.folder\Standard_D2s_v3.serviceoffering"



error that is displayed>>


New-ProvScheme : A positional parameter cannot be found that accepts argument 'StringProperty'.
At line:1 char:1
+ New-ProvScheme  -AdminAddress $AdminAddress1   -CleanOnBoot -CustomPr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-ProvScheme], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Citrix.MachineCreation.Sdk.Commands.NewProvSchemeCommand



any ideas or working scripts to create a MachineCatalog on Azure




Link to comment

1 answer to this question

Recommended Posts

  • 1

I believe the issue is with formatting. I just ran into this while modifying custom properties of catalog. What worked is creating a variable for custom properties AND correctly formatting it:


$custom='<CustomProperties xmlns="http://schemas.citrix.com/2014/xd/machinecreation" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Property xsi:type="StringProperty" Name="StorageAccountType" Value="Premium_LRS" />
<Property xsi:type="StringProperty" Name="UseManagedDisks" Value="true" />
<Property xsi:type="StringProperty" Name="ManagedDisksPreview" Value="false" />
<Property xsi:type="StringProperty" Name="LicenseType" Value="Windows_Server" />

  • Like 1
Link to comment

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...