Unsolved
1 Rookie
•
78 Posts
1
2107
May 4th, 2022 15:00
Interested in VxRail Automation? VxRail API PowerShell Modules: Quick Start and Educational Offerings
Did you know VxRail has a public RESTful API available? Did you know almost every VxRail API endpoint has a commensurate Cmdlet available in the VxRail API PowerShell Modules? Perhaps you're already a VMware PowerCLI user and would like to expand task automation capabilities. Well, if you have a VxRail, and leverage PowerShell, this may be another arrow in your automation quiver.
Let’s get started:
- The modules are supported on Windows PowerShell 5 or higher on a system with connectivity to VxRail Manager’s IP address / FQDN. You’ll also need an appropriately privileged account from a vSphere identity source. The administrator@vsphere user is an example of such an account, or any account with the “VMware HCIA Management” role against a given vCenter.
- The VxRail API PowerShell Modules can be downloaded from the Dell EMC Support site by searching for “PowerShell” and downloading the zip file:
- Inside the “VxRail_API_PowerShell_Modules.zip” file you’ll find modules, install guide, and an installation script:
- Install the modules. There are two techniques covered in the "VxRail API PowerShell Modules.pdf" (Installation Guide). You could just use the installation script, or copy the VxRail API PowerShell Modules and place them in a directory in your $ENV:PSModulePath. In my case, I'm using a directory in the PSModulePath (C:\Program Files\WindowsPowerShell\Modules), and then copied the modules to that directory:
- View the installed modules. Once the module are installed (copied), either manually or via script, you're ready to get started. Open a PowerShell Console and type:
Get-Module -Name vxrail* -ListAvailable
- View the Cmdlets (there are 95 Cmdlets as of the March 03, 2022, release), type:
Get-Command -Module vxrail*
- Try a command! This is just a small portion of the output from getting chassis details, but I wanted to provide an idea of what a commands looks like. Day 1 commands (before the cluster has been formed during implementation) require just the 'Server' parameter, while Day 2 commands (after the cluster has been formed) require the 'Server', 'Username', and 'Password' parameters as seen in the example below:
- Have fun, if you want a nice overview, checkout the free “Tech Exchange - Automation with VxRail API” training linked below. If you would like more depth, checkout our upcoming “Automation on VxRail” offering.
Want to know more?
- Tech Exchange - Automation with VxRail API: Free Offering, 1 Hour, On-Demand
- Automation on VxRail: 4 Hours, Instructor Lead, you’ll likely have Doug and I as your instructors!
Can’t get enough of my insufferable posts? Subscribe to VxRail Discussions!
Think I’m doing a borderline acceptable job? Kudos maybe in order!
Feel like commiserating, gimme a Me too!
Reply to add a compelling comment!
#NeedlessVxRailVerbosity