powershell

Adding Your Own Plugin to vCheck6

The vCheck PowerCLI script from Alan Renouf is one of the most popular scripts for managing vSphere with PowerCLI. Its an amazing piece of work and I think has in its own small way helped the success of PowerCLI itself, by showing the kind of information it is possible to retrieve from vSphere and present in a great format. The number of people I talk to who use it and the large scale organisations that you would think spend thousands of pounds on expensive monitoring tools that have it as part of the daily monitoring checks never ceases to surprise me.

Basic VMware Cluster Capacity Check with PowerCLI

I recently needed to provide a high level capacity overview per VMware cluster looking at some metrics of interest that were being used as a guide to the capacity state of a cluster. Note: these are by no means definitive or the ones you should be using in your environment, but for these purposes they met the requirements. The metrics I looked at per cluster were the ratio of vCPUs to pCPUs, the amount of Effective, Allocated and average Active Memory and the amount of Free Diskspace.

Using PowerShell To Check That Windows Server Services Set To Automatic Have Started

Following on from the blog post Testing TCP Port Response from PowerShell which provided a means to check that servers had fully rebooted after a patching and reboot cycle, I needed to take this one step further and check that all of the Windows Services set to Automatic successfully started after the reboot. This should be pretty straightforward since we have a Get-Service cmdlet. Unfortunately however, this cmdlet does not return a StartMode parameter, i.

Obtaining Symantec Endpoint Protection Version Info with PowerShell

Right, let’s set this one out. I do not, have not ever, nor probably will ever will like any AV Enterprise Management Products. However, sometimes you have to work with them and frequently the data in the Management Product does not actually reflect the end user / server estate. The below function will query the registry of a remote machine(s) and report back the state of the installed Symantec SEP client to help perform a true up.

Configuring HP EVA Recommended Settings for ESXi via PowerCLI

The HP Enterprise Virtual Array Family with VMware vSphere 4.0 , 4.1 AND 5.0 Configuration Best Practises Guide, available here, contains many recommendations for ESXi configuration. There are a number of recommended settings in this document to enhance the storage performance, a subset of which I have picked as appropriate for the environment and then needed to configure them on all ESXi hosts. They can be implemented via PowerCLI and the below script demonstrates how these different types of settings can be configured.

Testing TCP Port Response from PowerShell

Recently I was listening to the PowerScripting Podcast and Hal mentioned a Test-TCPPort function he had put together a while back. I had a similar need to be able to test a bunch of machines post reboot, that they had come back successfully and a Ping test wouldn’t do since that didn’t necessarily mean that Windows has successfully booted :-) So taking inspiration from that post I put together the following script (I convert it to a function for my own use, but it’s easier for my colleagues to use as a script) which will test by default RDP response from servers and report the results.

UK PowerShell User Group December 2011 - Use the WSMAN cmdlets to retreive WMI information

The UK PowerShell User Group for December 2011 will take place at 19.30 GMT on Thursday December 15t. The topic is ‘Use the WSMAN cmdlets to retreive WMI information and see a demo of the new WMI API’s CIM cmdlets in PowerShell v3 CTP 2’. I’m looking forward to seeing the new CIM cmdlets from V3 CTP2 since I haven’t had chance to play with those yet. Details from Richard Siddaway’s blog are below:

Reporting on Windows File Server Shares and NTFS Permissions with PowerShell

I recently had a requirement to audit the Share and NTFS permissions of a Windows File Server. PowerShell contains the Get-ACL cmdlet which makes retreving the NTFS permissions fairly straightforward, but for the Share permissions it is not so easy, but we can make use of WMI and the Win32_LogicalShareSecuritySetting class. The below forum post details some discussion around using this class to find the Share permissions and unsurprisingly the legendary Shay Levy provides the solution.

PowerShell V3 CTP2 - Now Available

The second Community Technology Preview of PowerShell V3 is now available. This pre-beta release gives of a flavour of areas of change which may appear in the final release. A CTP has an emphasis on Community , i.e. the PowerShell team is looking for plenty of feedback for this release while they still have time to change things. Below are items logged on Connect by the community which have been fixed since the release of CTP1 - so if you find an issue in your testing, please log it on Connect so it can be reviewed and potentially resolved.