![Share on Facebook Facebook](https://www.system-center.me/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/facebook.png)
![Share on Twitter twitter](https://www.system-center.me/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/twitter.png)
![Share on Reddit reddit](https://www.system-center.me/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/reddit.png)
![Pin it with Pinterest pinterest](https://www.system-center.me/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/pinterest.png)
![Share on Linkedin linkedin](https://www.system-center.me/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/linkedin.png)
![Share by email mail](https://www.system-center.me/wp-content/plugins/social-media-feather/synved-social/image/social/regular/48x48/mail.png)
While trying to build some Private Cloud runbook I first wanted to get the User Role Quota… well, it’s sounds easy because I’ve got a built in component for that action…
As you can see… I had to add the VMM Connection that I’ve configured for working with that OIP.
Everything looks great and ready for running… but wait, when testing it I’m getting this error:
The following errors occurred when invoking PowerShell script:VMM is unable to perform this operation without a connection to a Virtual Machine Manager management server. (Error ID: 1615)
Use the Get-VMMServer cmdlet or the -VMMServer parameter to connect to a Virtual Machine Manager management server. For more information, type at the command prompt: Get-Help Get-VMMServer -detailed.
Exception: InvalidOperationException
Target site: PSRunspaceInvoker.HandleInvokeErrorsStack trace:
at Microsoft.SystemCenter.Orchestrator.Integration.PowerShellConnector.PSRunspaceInvoker.HandleInvokeErrors(IList invokeErrors)
at Microsoft.SystemCenter.Orchestrator.Integration.PowerShellConnector.PSRunspaceInvoker.Invoke(RunspaceInvoke runspace, String script, ILogger logger)
at Microsoft.SystemCenter.Orchestrator.Integration.PowerShellConnector.PSScriptRunner.Execute(String script)
at Microsoft.SystemCenter.Orchestrator.Integration.VMM2012QIK.GetUserRoleQuota.DoWork(IActivityRequest request, IActivityResponse response)
at Microsoft.SystemCenter.Orchestrator.Integration.VMM2012QIK.VMMBase.Execute(IActivityRequest request, IActivityResponse response)
Hey ! I’ve used the VMM Connection, why the component say it cannot connect the VMM ?- I dunno… but the workaround goes like this:
- Drag the “Run VMM PowerShell Script” Component
- add the following line code in the “Powershell Script” field: $con = Get-SCVMMServer -ComputerName “yourVMMServer.domain.local”
- add the following line code in the “Output Variable 01” field: $con
- Link this component to the Get User Role Quota Component.
- Run your runbook and… Walla !
Have fun !
This also works for DPM 2012 R2!!!!!
Thanks!
Heck of a job there, it abtsuloely helps me out.