VMware Cloud Community
AllBlack
Expert
Expert

Some cmdlets not working with vCO

Hi

I am trying to automate VM creation in Azure through VCO and I seem to have some issues with certain cmdlets.

I am connecting to Azure fine and can run cmdlets such as get-azuresubscription or get-azurestorageaccount but cannot seem to execute the commands around VM creation or retrieval.

I have my cmdlets in a script and can run these fine when I execute them from the PS host directly but not when I call it via vCO.

Is there something I forgot? I noticed a few ps.snapins listed under the PS host configuration but azure is not one of them. I do import it via my script but don't have full functionality

PowerShellInvocationError: Errors found while executing script

Add-AzureProvisioningConfig : An error occurred while sending the request.

At line:12 char:8

+ $vm1 | Add-AzureProvisioningConfig -Windows -AdminUserName $adminName

-Password  ...

+       

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : CloseError: (:) [Add-AzureProvisioningConfig], H

   ttpRequestException

    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagemen

   t.IaaS.AddAzureProvisioningConfigCommand

New-AzureVM : An error occurred while sending the request.

At line:13 char:8

+ $vm1 | New-AzureVM -ServiceName $serviceName

+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : CloseError: (:) [New-AzureVM], HttpRequestExcept

   ion

    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagemen

   t.IaaS.PersistentVMs.NewAzureVMCommand

(Dynamic Script Module name : invokeScript#14)

Please consider marking my answer as "helpful" or "correct"
0 Kudos
2 Replies
SpasKaloferov
VMware Employee
VMware Employee

Hi,

Can you please clarify more. You say you say your script runs fine when you execute it from the PS host, but you also say that yo do not see all the snap-ins.

Can you please specify the entire command/script you are running from vRO?
Also what type of authentication you are using? If it is AD or you are syncing with AD (SSO) they you might nee dto configure CredSSP on the PS Host.

Best Regards / Поздрави

Spas Kaloferov | Technical Solutions Architect

www.kaloferov.com/blog

0 Kudos
SpasKaloferov
VMware Employee
VMware Employee

0 Kudos