Skip to main content

Mac / Docker / PowerCLI


Mac / Docker / VMWare PowerCLI:



  1. Install Docker for Mac:  https://store.docker.com/editions/community/docker-ce-desktop-mac 
  2. Install Docker to your Applications folder
  3. Launch Docker
    1. Test with "$ docker version" or "$ docker ps" from your terminal app
  4. Create a local folder for your own powercli scripts
    1. Mine is:  "/Users/nathan/scripts/PS/VMW/"
  5. Edit or create a ".bashrc" file in your home directory with the following two aliases.
    1. alias powercli-start='docker run --name PowerCLI --detach -it --rm --volume '/Users/nathan/scripts/PS/VMW/':/usr/scripts vmware/powerclicore:latest'
    2. alias powercli='docker attach PowerCLI'
  6. Relaunch your terminal (aliases won't take effect until .bashrc  is referenced)
  7. Run the following command to start the PowerCLI docker
    1. $ powercli-start
  8. Run the following to attach to the PowerCLI docker image
    1. $ powercli
    2. You may have to hit "return" a  few times to see the PS prompt.
    3. Upon exiting the powershell terminal the docker is terminated. 



Now to figure out what to do with PowerCLI.This is new to me.



If you want to throw it away run:

 $ docker rmi vmware/powerclicore



Thanks to railroadmanuk for help with attaching to the local scripts folder: https://virtualbrakeman.wordpress.com/2017/03/15/powercli-core-on-docker-with-macos/


Comments

Popular posts from this blog

Firepower Threat Defense HA Upgrade

Upgrading an HA Pair of Firepower 2110s in FTD mode ~~~~~~~~~ UPDATE!!  ~~~~~~~~  As of FMC and FTD 7.0 this process is much more straightforward.  Readiness Check is now enabled for an HA pair of firewalls.  After pushing the update to the appliances, you can go into the upgrade screen and select both and do the "Check Readiness" button on both and wait for the results prior to doing the install.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you are like me you don't upgrade an FTD appliance often enough to remember the procedure. Today I installed the 6.3.0.1 update to an HA pair of FTD 6.3.0 2110s. This document assumes you have already updated the Firepower Management Center (FMC). Download Updates to the FMC From the FMC click on "System" then the "Updates" tab. If the update desired is not listed, click the "Download Updates" button. Push the update to the HA pair of devices Click the button on the far right marked "Push or Stag...

Nexus 7000 as a Collapsed Core/Distribution Switch

I work for a mid-sized business that continues to grow and utilizes a lot of bandwidth.  While we had a 6513 in our core that continued to operate just fine, it was beginning to show it's age.  We had maxed out the 10Gig capacity and really had need of chassis redundancy in our core.  We already had Nexus 5000's in our Data Center as well as Nexus 1000v in our virtual environments, however using Nexus as your core routers is a completely new challenge.  I had spent several weeks reading up on vPC limitations and the advantages Nexus 7000 has with certain FHRPs but actually doing it, after more than a decade of installing only Catalyst switches into the core of networks, was a new challenge.  This is my first, and perhaps last post but I think that an actual working design and configs may bring some value to those of you out there who, like me, have a little network know-how but little or no experience with Nexus. The image above is the actual design of ou...

Let's Encrypt for IIS with Win Acme

  I finally think I have my arms around using Win Acme for IIS to generate and renew site certificates for "Let's Encrypt."   I know this should be simple, but for some reason, I continue to mess it up by trying to make it more complicated than it is.   There are a lot of options in Win Acme, but I do not need to deal with most of them.     Win Acme can be found at:   https://www.win-acme.com/   More on Let's Encrypt:   https://letsencrypt.org/   Edit Site bindings in IIS.   Add both internal and external DNS names and ports.     Add the DNS Name in the hostname field.     Run Win Acme as administrator.     Work through the prompts for IIS (most of the default options should be fine).       Win Acme should create the certificates and replace the existing certificates in IIS with the  new...