How does one convert PSVirtualMachineObjects?


I’m trying to deploy Azure VM’s thru a workflow so it could be done in parallel. The code works fine outside of a workflow. But getting this error when trying to do it thru a workflow.

I’m importing the VM parameters thru a csv file.
Are there additional considerations for deploying Azure VM’s thru a Workflow?

and getting this error

Cannot bind parameter ‘VM’. Cannot convert value
“Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine” to type
“Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine”. Error:
“Cannot convert the
“Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine” value of
to type “Microsoft.Azure.Commands.Compute.Models.PSVirtualMachine”.”
+ CategoryInfo : InvalidArgument: (:) [Set-AzureRmVMOperatingSystem], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.Azure.Commands.Compute.SetAzureVMOperatingSystemCommand
+ PSComputerName : [localhost]


Resolved using inline script for the incompatible cmdlets.


How does one convert PSVirtualMachineObjects? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply