The greatest challenge to any thinker is stating the problem in a way that will allow a solution

Bertrand Russell

Welcome to vBlog, a personal record of my techy tinkerings and particular ponderings.

I tend to focus on VMware virtualisation, and the interaction/automation of it using PowerCLI (VMware's PowerShell Snapin), but anything that I happen to stumble across that seems like it might be of use at a later date, may well get recorded here.

I also maintain vWiki, which was a predecessor to this blog. Wiki's are great for quickly recording snippets of info, but tend not to look that great; Blog's are better looking things, but seem to require more effort so that the posts/articles are accessible in their own right. As a result I tend to update both interchangeably as available time, and depth of thought, permit.

If you happen to find anything of use, or in need of correction please leave a comment. Knowing that my ramblings are of some use is a great reward; and similarly I'd hate to waste anybody's time by feeding them duff info.

See these pages for me info about me, and my vBlog, and below for my recent posts...

Being able to create scripts to complete repetitive tasks and complete work that would otherwise give you headache is a wonderful thing, being able to schedule those scripts increases the available fire-power in your arsenal.

Like most things in IT, it can be a bit of a head scratcher to sort out the first time, but once you’ve seen it once you can just copy and paste. See below for a few examples…. Continue reading →

One of the great problems with creating scripts that will be run when you’re not around is how to provide them with the credentials that they need.  Microsoft have intentionally tried to make it difficult to simply include username and password information in the raw, in scripts.  This is a good thing, but it can be an initial stumbling block when you’re getting started.

To get around this irritation, without bypassing the security it provides, I store my password in an encrypted file, which called upon by every script that needs it… Continue reading →

To my mind, the beauty of a truly powerful scripting language, is the sense that you can achieve anything that you might need to. You just need to apply yourself, and the full force of Google, and be prepared for a bit of trial and error.

The fact that PowerShell let’s you unleash the full might of the .NET army means that this is pretty much true for it. Recently I head the need to be able to interact with a number of Vyatta routers (see my SSH to Vyatta Router Using PowerShell post), in order to be able to get a load of virtual machine’s NAT’ed addresses, and found two possible solutions, one of which is fairly well documented on the Web (which I struggled to get on with), the other of which is new (in beta still at time of writing) and not particularly prevalent, but seems very flexible…. Continue reading →

Being able to send an email from a script is always a useful tool to have in your back pocket. Be it for sending out an alert for a bespoke check, an email over the weekend to let you know that that big task script has completed (un)successfully, a regular report mail, or some other reason.

Sending a basic text email is incredibly easy (2 lines), and it doesn’t take much more effort to be able to send fully formatted HTML email with attachments (though obviously you’ll need to put some effort into creating the HTML).

Continue reading →

Being able to supply appropriate security credentials are a necessary obstacle in today’s security conscious world of IT. When I first started, many moons ago, the systems I managed all had the same (dictionary word) password to the (un-renamed) local Administrator account, you didn’t lock your PC, have to change your password, or have to worry about not being a domain admin on every system by default.

PowerShell scripts inherit the rights of the user that start them, which is normally all well and good if the script only need to run and access local resources, but as it needs to access any remote resources the chances of having to supply credentials grows rapidly.

Credentials are represented by a PSCredentials object , this can then be supplied to a CmdLet that requires it… Continue reading →

Powershell is now the standard for Windows based scripting, providing a route into the wealth of .NET Microsoft objects available and now being commonly provided for by 3rd-party applications by API Cmd-Lets.  If you administer a Windows world, then you need to get used to Powershell.  Its an object-orientated environment, which takes some getting used to if you’re not familiar with it, but its very versatile once you’ve got some confidence. Continue reading →