The “why” is important

I like why. It helps me understand context. But in an increasingly email-laden world where everyone is "too busy" and emails are becoming more and more concise, the why is often the first thing to be omitted. And this is a freaking travesty. The "why" helps people understand why something is happening and the impact that it has. It gives context and, if it's a request, it enables the recipients to use their own judgement and experience to assist above and beyond what's originally being asked for (aka adding value). Not only that, but understanding the why makes people care more.


Here's a few examples of how adding the why helps with context and understanding: IT Maintenance Window (Understanding) Too-busy:
Windows servers will be down for maintenance over the weekend. You won't be able to access your files during the outage window.
 With the why:
In order to help keep our computer systems secure from outside threats (such as hacking) and to keep our systems more stable, we will be installing the latest software updates to our Windows servers over the weekend. You won't be able to access your files during the outage window, but we will let you know once the outage is complete.
Storage Archive Request (Adding Value) Too-busy:
Your project XYZ on the Moon has been inactive for 3 months. Please could you archive project directory XYZ?
With the why:
We're working to free up infrequently used space on our storage systems to help us reduce our storage purchasing needs for the Moon over the next quarter.
We've identified that your project XYZ has been inactive for 3 months. Please could you archive project directory XYZ?
Now, armed with this extra information, I might then start to think about other project areas that could be archived in the future and queue those up. Doing so will help further optimise the storage space and save even more money (the added value) Give your colleagues a chance, and include the why :)

Connecting to multiple storage systems with the NetApp PowerShell Toolkit

Scope This post discusses methods to connect to multiple NetApp Storage Systems using the NetApp PowerShell Toolkit, and then execute commands against those storage systems Background OK, so you've setup the NetApp PowerShell Toolkit, and you can connect to a storage system and run some commands. But what if you have more than one storage system? Conceptual overview As with all things scripting, there's many ways to achieve this, but here's roughly what I'll be blogging about below:
  1. Gettting a list of storage systems:
    1. Via Text File: Keep an easily-accessible text file up to date with all your storage systems
    2. By enumerating from Active Directory: Query AD to get a list of all your storage systems (providing they're in AD!)
  2. Setup authentication details for all the storage systems
  3. Connect to the systems and run commands
Getting a list of storage systems Text file method This is the simplest and sweetest method, but doesn't scale too well in a large organisation, so buyer beware ;) Create a text file in an easily accessible location, such as your home directory or Desktop and populate it with a carriage-returned list of hostnames. For example:
Knowing where the text file is located, we can now setup the base for our PowerShell script:
Where's the list?
$ListLocation = "C:\Users\Phil\Desktop\filers.txt"
#Read the contents of the list into an array
$FilerList = Get-Content $ListLocation
Now, to see what's inside the $FilerList array, just type:
echo $FilerList
You should now see a list of NetApp Storage Systems, like so:

Enumerate from Active Directory Another way to get a more dynamic list of storage systems is to use an Active Directory lookup In the example below, all the storage systems are called roughly the same thing. Many organisations have naming schemes, such as: na-site-number (for example, na-cbg-001). If you always call your storage systems the same thing, you can query AD and locate all your filers, like so:
 import-module ActiveDirectory
 #what are we searching for?
 $FilerNameScheme = "na-site-*"
 #Let's query AD for systems with a name like $FilerNameScheme, and filter only Enabled accounts, and then only show the shortname for the host
 $FilerList = Get-ADComputer -Filter {(Name -like $FilerNameScheme) -and (Enabled -eq "True")} | Select -Expand Name
Now, to see what's inside the $FilerList array, just type:
echo $FilerList
You should now see a list of NetApp Storage Systems! Authenticating against multiple storage systems OK great. Now that we have a list of storage systems, we can use the $FilerList array to authenticate to all the storage systems:
 #Let's setup the login credentials we'll be using for the storage systems
 $authentication = Get-Credential
 foreach ($filer in $FilerList) { 
 #add authentication for this filer, using the credentials we just entered
 Add-NaCredential -Name $filer -Credential $authentication 
At this point, you'll be shown a list of all storage systems with authentication credentials stored. For example:

Running Commands Now that you've got a list of filers inside the $FilerList array and credentials queued up, you can start to run commands against them all using the simple template below. I'll throw some examples in too, in case it helps:
 #for each entry in the list, run these commands…
 foreach ($filer in $FilerList) { 
 #connect to the storage system
 Connect-NaController -Name $filer
 #Put your commands here, for example...
 #show system version
 get-nasystemversion | format-table
 #show volumes and aggrs
 Get-NaVolContainer ; Get-NaVol | format-table
 # show me the following options settings
 get-naoption cifs.smb2.enable cifs.smb2.client.enable cifs.tcp_window_size cifs.oplocks.enable

Putting it all together Here's an example of a full script which uses a text file for a list of filers, sets up login credentials, and then runs a few commands against each system.
#Where's the list?
$ListLocation = "C:\Users\Phil\Desktop\filers.txt"
#Read the contents of the list into an array
$FilerList = Get-Content $ListLocation

#Let's setup the login credentials we'll be using for the storage systems
$authentication = Get-Credential

foreach ($filer in $FilerList) { 
#add authentication for this filer, using the credentials we just entered
Add-NaCredential -Name $filer -Credential $authentication 

#for each entry in the list, run these commands...
foreach ($filer in $FilerList) { 
 #connect to the storage system
 Connect-NaController -Name $filer
 echo "Connecting to $filer"
 #show system version
 get-nasystemversion | format-table
 #show volumes and aggrs
 Get-NaVolContainer ; Get-NaVol | format-table
 # show me the following options settings
 get-naoption cifs.smb2.enable cifs.smb2.client.enable cifs.tcp_window_size cifs.oplocks.enable
And finally, here's an example of the output you'd see:

How was that?

How was that? Let me know in the comments what you're using it for. I'd love to know! :)

Completely free IT training resources to help diversify your IT career

Scope and overview Inspired by Don Jones' excellent "Don't Get Stuck in Your Job" blog post, I've taken some time to compile a bunch of online IT training to help people diversify their IT knowledge, for free. This post covers a selection of free IT training that I've found on my travels. Topics are diverse, and include topics such as: Virtualization and Cloud, Networking, Security, Linux, Storage systems, PowerShell, to Programming and Database fundamentals. I believe that as IT Professionals, the more aspects of IT that we understand and appreciate, the better we're able to meet the needs of business. I'd really like this to evolve into a community resource for anyone who wants to diversify their IT knowledge. If you've found other free IT training or resources that aren't mentioned here, please feel free to mention it in the comments and I'll endeavour to add it (I'm particularly interested in official training from vendors). If you're left wondering where on earth you're going to get time to study all this, remember that it only takes about 20 hours to pick up a subject/skill, and that's merely a month of Lunch-times! Virtualization and Cloud VMware  

Full list of Free self-paced learning from VMware

Hyper-V OpenStack Multi-technology Virtualization PowerShell Linux Programming and Databases General Programming Python Databases DevOps

DevOps: an IT Pro Guide (Microsoft Virtual Academy)

Configuration Management/Automation Very useful for keeping IT systems configuration in sync with internal standards, as well as automation of routine tasks/etc. Puppet Networking General Cisco Security Storage Systems/Arrays NetApp NetApp have an incredible range of Web-Based courses available for free, but you will need to register for an account (Choose a Guest account if you're not a customer). Also, be careful with "free email addresses". NetApp seem to verify your account and if it comes from a hotmail or gmail account, will not allow it access. I find this a slight abberation, as they allow access for Guests who don't have NetApp systems, who could be future paying customers. I had success with an account, but your mileage may vary. Some highlights: EMC Full list here. But some of these are only available to customers and partners! Anything I list below is available to anyone (i.e. non-customers) for free. Backup and Recovery Microsoft Client, Server and Office Server 2012 Windows 8 System Center Configuration Manager (SCCM) 2012 Active Directory OneNote  

Update log

2014-10-23: Added EMC Hybrid Cloud with VMware Fundamentals e-Learning, with thanks to Christopher Kusek 2014-07-31: Added Puppet Workshop Course Library, and a new section for Configuration Management/Automation, with thanks to Brian Trainor. 2014-07-26: Added a note about signing up for a NetApp account 2014-07-20: Added: Understanding TCP/IP from Cisco Learning to Networking section. SCCM 2012, Active directory, and upskill from Server 2008 to 2012 courses to Microsoft section. 2014-07-16: Added a link to a compiled list of Couch to OpenStack sessions, thanks to Nick Marshall for compiling! 2014-07-14: Added Security, Networking and Windows Server courses by Added Linux resources: Introduction to Linux Course, by eDX and some videos from the Linux Foundation.

Getting Started with the NetApp PowerShell Toolkit

Scope This post takes a quick look at the NetApp PowerShell Toolkit: a set of PowerShell cmdlets which can be used to query and change settings on NetApp Storage Systems, paving the way for automation of common tasks or generating regular reports. It runs through installing the PowerShell toolkit, and running a few basic commands against a NetApp storage system.

Resources The following resources will be of use. You'll need a NetApp "NOW" account to download things. It's free to sign up, but according to NetApp you'll need to be a customer or a partner to download the Toolkit. Pre-requisites You will need:
  • PowerShell 2.0 or higher installed on your Windows system (Windows 7/Server 2008 R2 has PowerShell 2.0 installed out of the box)
  • The NetApp PowerShell Toolkit file
Install the NetApp PowerShell Toolkit and adding the modules Extract the downloaded to:


The files should end up inside: %SYSTEMROOT%\system32\WindowsPowerShell\v1.0\Modules\DataONTAP Note: On a multi-user system, if you want the toolkit to be available for only yourself, place it inside: %USERPROFILE%\Documents\WindowsPowerShell\Modules\ Start PowerShell and run:

import-module DATAONTAP

Optional: Add the import-module DataONTAP command to your profile (so it's available every time you use PowerShell):

Where is our profile?:


Does that profile exist?:

test-path $profile

If True, skip the "If False" step and move to notepad $profile.

If False, run:

new-item $profile -itemtype file -force

Edit the file:

notepad $profile

Add the following line to the ps1 file:

import-module DataONTAP

Save the file. You'll now import the DataONTAP PowerShell modules every time you start PowerShell!

Getting help One of the most important functions in PowerShell - or any command-line shell - is the ability to get help. You'll find this invaluable as you work your way around PowerShell and the NetApp toolkit (I certainly have!). To view the list of cmdlets available from the NetApp toolkit:


Use -Category switch and/or wildcards to narrow the results. For example:

Get-NaHelp -Category volume

Get-NaHelp -Category options

Get-NaHelp *NaCredential

To see help for a specific cmdlet (command):

Get-Help Connect-NaController

For full details of a cmdlet, including examples:

Get-Help Connect-NaController -full

Authenticating and connecting to a NetApp storage system Before you can run commands/queries against a storage system, you need to connect to it and authenticate to it. Add login credentials for the session The Add-NaCredential cmdlet caches credentials for a storage system. This can be useful if you manage many storage systems, potentially each with different credentials. When you come to connect to a storage system using Connect-NaController, the connection will authenticate with the information held in the auth cache (pretty neat!).

Add-NaCredential -Name <hostname> -Credential <username>

For example:

Add-NaCredential -Name cylon82 -Credential root

Alternatively, just use -Credential with the Connect-NAController command, if using a single NetApp controller To see current credential list:


For example:

Connecting to a single NetApp controller Now you can open a connection to a Netapp controller to run some commands against it.

Connect-NaController -Name cylon82

Or if you didn't specify authentication credentials earlier, try:

Connect-NaController -Name cylon82 -Credential root

For example:

Basic usage To get started, let's take a look at a few very basic commands. Get System Information from the NetApp controller you've connected to OK, now you're connected, run a few sample commands to get a feel for how this works. Let's look at some basic system information:



Volume information Alright, now let's take a look at the volumes on the system.


It's also possible to roll up two commands to run one after the other, using the semi-colon separator ";", for example:

Get-NaVolContainer ; Get-NaVol | format-table

It's powerful, too! With the power of PowerShell, we can do some really neat things. Take these two for example: How many shelves are connected to my system? *This only works on a real NetApp storage system. It won't work on a NetApp Simulator, sorry. Normal command:



Get-NaShelf | Sort ID -Unique | Select ID,Status,Name | Format-Table

This advanced command:
  1. Runs the Get-NaShelf command
  2. Sorts the output by Column ID (so they're in order) and removes duplicates from the column. This is useful as Get-NaShelf outputs details for both channels of a shelf ID if you're using Multipath cabling.
  3. Selects only the headers ID, Status and Name.
  4. and then outputs the results into a formatted Table.
list shelves - powershell Setting many options in one go As above, it's possible to run a number of commands on a single line. In the example below, I'm setting some CIFS/SMB options on a test storage system:

set-naoption cifs.smb2.enable on ; set-naoption cifs.smb2.client.enable on ; set-naoption cifs.tcp_window_size 64240 ; set-naoption cifs.oplocks.enable on

This command:
  1. Runs many set-naoption commands on a single line (separate by semi-colon ";").
  2. This makes it easier to see what's been run on the filer after the commands complete, as they all appear in a single block
How was that? How did you find that? I was amazed at how easy it is to pick up and play with, given an hour or so initially. I really like the potential of the toolkit for automation some of my SMB benchmarking tasks, so I'll be looking at that over the next few weeks. As always, I encourage and welcome feedback. So drop me a note in the comments! :) Next steps As you can see, the toolkit is very powerful; and I've barely scratched the surface! Take a look at all the options available to you by running:


And for each interesting option, you can get more information by running:

Get-Help <cmdlet name>

In my next blog, I'll take a look at how you can authenticate and connect to many NetApp controllers and run commands against them all: Connecting to multiple storage systems with the NetApp PowerShell Toolkit

Thoughts on learning-procrastination, and the myth of 10,000 hours

I have a problem. And it's stopping me from learning. I've swallowed the line that it takes 10,000 hours to master a skill, and it's scared me off learning new things. I am naturally curious. I want to learn, but I put off doing so because I know I'll never be an expert in that field. So instead I potter around the fringes and play with things half-heartedly. That was, until I watched this TEDx video: The first 20 hours  (20 minutes) In it, Josh Kaufman discusses why you don't need to burn 10,000 hours on a subject, why 20 hours of focused practice is "good enough", and how to overcome the inertia that prevents you from learning new things in the first place. It's well worth a watch, especially if - like me - you're putting off learning because you're scared of the amount of effort it'll take to be good: because 20 hours is good enough :)

A quick summary of what I picked up

20 hours in perspective:
  • 20 hours is only 45 minutes per day, for a month. That means you can pick up a new subject/skill in around a month of lunches! How's that for motivation?
4 steps to rapid skill acquisition:
  1. Deconstruct the skill
    1. Decide what you want to do when you're done
      1. Example: be proficient in setting up and managing VMware vSphere
    2. Then break down the skill into chunks/pieces, that will get you to that total goal
      1. Example: VMware vSphere. Break it the learning down into individual components and focus on those. Install, Configure it, and troubleshoot. Also focus on day-to-day management tasks like setting up Datastores, troubleshooting performance issues, and  setting up vMotion.
  2. Learn enough to self correct
    1. Once you start learning, you can begin to self-correct yourself based on earlier learning.
  3. Remove practise barriers (distractions)
    1. TV, Twitter, email client, mobile phone.
  4. Practice at least 20 hours. Don't give up!
    1. Break through the initial frustration barrier, where things feel like they don't make much sense or that you're not making much progress. Stick with it, long enough to learn it properly and you'll be pleased with the results.