DefinIT

  • VMware
    • NSX
    • vRealize Automation
    • vRealize Orchestrator
    • vSphere
    • vSAN
    • vRealize Operations
    • Log Insight
    • PowerCLI
  • Community
    • VMworld
    • Opinion
    • Webinar
    • Career
  • Storage
    • vSAN
  • Networking
    • NSX
  • Authors
    • Simon’s Lab
    • Sam’s Lab
  • GitHub

Configuring a vRO/vCAC PowerShell host with Basic Authentication

23/12/2014 by Sam 3 Comments

vCenter Orchestrator (vCO)To add a Windows Server 2012 R2 PowerShell host using Basic Authentication only, follow these steps.

Ensure that the Windows Firewall service is running (it doesn’t matter if the firewall is enabled or disabled, it should always be running! That’s a general rule, not just for this).

On the PowerShell host open a command prompt (*NOT* PowerShell console) as administrator and run the quickconfig command – you can re-run it if it’s already been run – but make sure it has.

winrm quickconfig

Enable basic authentication:

winrm set winrm/config/service/auth @{Basic="true"}

image

Finally, allow unencrypted data to be sent:

winrm set winrm/config/service @{AllowUnencrypted="true"}

image

Testing WinRM configuration

Note: you can do these steps locally on the PowerShell host, or from a remote machine – remote is a truer test.

On the PowerShell host, check that the port is open/listening:

netstat -an | find "5985"

image

On the WinRM client allow basic authentication (run quickconfig if required first!):

winrm set winrm/config/client/auth @{Basic="true"}

And allow unencrypted:

winrm set winrm/config/client @{AllowUnencrypted="true"}

image

Finally, test you can connect to the PowerShell host using the winrm client:

winrm identify -r:http://man-01.definit.local:5985 -auth:basic -u:testuser -p:testpassword -encoding:utf-8

image

Now we know that the WinRM service is in fact listening and responding, we can move on to vRO/vCO

Adding the PowerShell host to vCO

Firstly, make sure you have the latest plugin from the vRO/vCO site (https://www.vmware.com/support/pubs/vco_plugins_pubs.html). At the time of writing this is 1.0.4 which supports PowerShell 1.0, 2.0, 3.0 and 4.0 – so Windows Server 2012 R2 is supported. Previous versions didn’t support 4.0.

Run the “Add a PowerShell host” workflow:

image

Configure the name of the host, the FQDN or IP address and the port – remember for HTTP it’s 5985.

image

Select WinRM, HTTP and Basic Authentication.

image

Finally, configure your Shared Session user details:

image

Sacrifice a small goat, and click submit. If you’ve been a good boy or girl, you’ll get a green tick:

image

Switch to the Inventory tab and check you can browse the new PowerShell host:

image

Now you can start running your PowerShell scripts from vRO/vCO to your heart’s content.

Filed Under: vRealize Orchestrator Tagged With: Automation, basic authentication, PowerShell, PowerShell, vco, vro, winrm

Comments

  1. Tony Khan says

    09/03/2017 at 7:46 pm

    Hi Sam, this is an excellent post. Just wanted to point out that I had to run those commands little differently on my machine for it to work… i.e.,
    winrm set winrm/config/service/auth ‘@{Basic=”true”}’

    Thanks,
    Tony

    Reply
    • Sam says

      13/03/2017 at 3:42 pm

      Hi Tony – glad it helped and thanks for contributing the updated info!

      Reply

Trackbacks

  1. Invoke anything PowerShell by integrating VMware VRO 7.0 with a VRA 7.0 Self Service Portal Part-1. -Virtualize & Automate- says:
    12/02/2016 at 5:27 am

    […] DefinIT – Configuring a vRO/vCAC PowerShell host with Basic Authentication […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Sponsors

VMTurbo - Why pay for monitoring? Vembu - Backup unlimited VMs, free, forever!

Tags

3rd Party Software Active Directory appliance Automation blogengine certificates Certificate Services ESX and ESXi esxi Exchange Exchange Exchange 2010 Hardware lab Networking nsx nsx-t NSX/vCNS opsmgr PowerCLI PowerShell PowerShell Security System Center vcac vCenter Server vco vmug VMUG VMWare vmworld vRA vRealize Automation vRealize Orchestrator vro vrops VSAN vsphere Webinar webinar What's new Windows Windows Server 2003 Windows Server 2008 Windows Vista
Creative Commons Licence
This work is licensed under a Creative Commons Attribution 4.0 International License.

Copyright © 2018 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in