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)
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
Take also look into this post: vRO and Microsoft Azure integration using PowerShell | Spas Kaloferov's Blog