One of the steps needed to onboard a system into our monitoring tools is to configure SNMP. If the customer template does not have SNMP pre-configured, or is not using GPO to do it; it quickly becomes a painfully slow speed-bump.

Last night I threw together the PowerShell script below to:

  • Install SNMP services
  • Configure SNMP Management servers
  • Configure Read-Only community strings
  • Configure Read-Write community strings
  • Configure Read-Only Trap community strings
  • Configure Read-Write Trap community strings
  • Configure System Location
  • Configure System Contact
  • Configure SNMP Name Resolution

 

More »

Here is a PowerCLI script I use to find all orphaned VMDK’s in my vCenter environment.

I wrote this a long time ago, hopefully it still works

After installing Cisco UCS and performing the initial setup of the UCS Fabric Interconnects; there is a lot of work that needs to be completed prior to configuring the blade Service Profiles.

This can be done a multitude of ways, manually through UCSM, scripted through SSH or now through PowerShell using Cisco PowerTool. This allows us to use variables at the top of the script; these variables allow us to make the script portable for various customer deployments.

There are a couple features that are not working yet:

  1. Setting the Global Power Allocation Policy – due to the enormous lack of detail in the get-help sections of Cisco’s PowerTool, I have been unable to find which function controls the Global Power Allocation Policy.  I believe it to be the set-ucspowergroup cmd-let but I have been unable to make it work correctly.
  2. Adding custom roles with customer permissions – the add-ucsuserrole cmd-let is not very well documented either, like others; I cannot seem to figure out how to get this cmd-let to create a new role with custom permissions.

When building out your UCS deployment, you create a series of Fibre Channel (FC) uplinks. Then you have to go back and add those FC uplinks to the VSAN’s that you created. This can be tedious if you have a lot of FC uplinks as you would need to modify each one. With Cisco’s Powertool, you can do this quite quickly with no mouse movement :)

As you can see:

are variable used so that you only need to modify the VSAN ID once. Otherwise, you would need to specify on each and every line.

This took me a while to figure out as Cisco’s get-help files (man pages for Linux folks) leave a lot to be desired.

if you run:

You get:

Which would lead you to believe that this command would work just fine:

But it does not, you have to pipeline through the get-ucsvsan output first.