PowerShell v3 – The Script Editors Choice or is it?

Musing over a well-earned break today with friend, college and, all round Exchange guru Will Rawlings the topic of Windows 8 was brought to the forefront. Will was telling me about how after acclimatising to the shock of the tiled interface he dug a little deeper and got his hands dirty with PowerShell v3.

There are some great new features in PS3 but what really grabbed Will’s attention, and later my own, was the new look ISE. It’s not only easier on the eye but has some useful functionality under the hood including Intellisense (a useful autocomplete feature) and much more.

The one simple thing that really got us talking was the copy and paste feature now maintains the colours seen in the ISE! That feature alone is worth the upgrade. Personally I prefer to use PowerGUI as my editor but on client systems I frequently use the ISE so I can’t wait until the Windows Management Framework v3 is released.


Of course the real excitement with PowerShell 3 does not lie in the ISE but it is well worth a look all the same. In order to try it out simply download the consumer preview of Windows Management Framework v3

4 Steps to Find and Remove Orphaned Disks in VMware Vcenter

Disk space can seem like an ongoing battle in many virtual environments. In this post I’m going to be showing you one way of dealing with orphaned disks within VMWare’s Vcenter in order to free up any “lost” storage.

First off, what is an orphaned disk? Well it’s fairly simple, ever deleted a disk from a virtual machine (VM) and not removed it from the datastore? Well congratulations, you have just created an orphaned disk! Orphaned disks are not attached to any VM within the Vcenter environment. In most cases that means we don’t want the disk, however there may be exceptions so before you run ahead and delete everything check that your orphaned disks aren’t shall we say, applying for adoption!

Pre Requisites:

  • PowerGUI – Download Here
  • PowerGUI – VMWare PowerPack (Included with PowerGUI)
  • VMware vCenter

To search our environment for orphaned disks we will be using the PowerGUI Administrative Console. Open the console from the start menu. We will be using the VMWare PowerPack. In the navigation tree window on the left hand side if you don’t see a “VMWare” tree then we need to enable the PowerPack, if you do the skip the next section.

1 – Enable the VMWare PowerPack

In the PowerGUI administration console browse to “File” > and click “PowerPack Management” Click “Import” and browse to “C:\Program Files (x86)\PowerGUI\PowerPacks” Select “VMware.VIToolkit.powerpack” click “Open” that’s it! Close the PowerPack Management window.

2 – Connect PowerGUI to vCenter

Expand the “VMware” tree and select “Managed Hosts” On the right hand menu click “Add Managed Host…” you are presented with the parameter window, here enter the FQDN name (or IP Address) of your vCenter server. Configure your account details and click “OK”

Your newly added vCenter host appears in the managed window, highlight your host and from the actions pane click “Connect”

3 – Run the Report

In the Navigation Tree (left hand pane of PowerGUI) Under VMWare\DBest Practice Queries \Disk Queries select “Orphaned VMDK files. Depending on the size and perfomrance of your environment the query will take some time to complete. You will notice at least one esxconsole-<hashed Number>.vmdk DO NOT DELETE THESE FILES.PowerGUI and the VMware PowerPack

4. Remove the Disks

After you have verified that the orphaned disks are genuinely no longer required it’s time to reclaim that disk space.

You could do this via Powershell and PowerCLI or even using PowerGUI but for the purpose of this article we will fire up vCenter and navigate to our datastore. From the “Home” page click “Datastores” .

Open the datastore containing the orphaned .vmdk file you wish to remove. Browse the contents of the datastore by right-clicking the datastore and selecting “Browse Datastore…”

In the datastore browser window navigate to the correct disk and select it in the main window. Check the name carefully, now is not a good time to delete the wrong disk! Select the disk and clik the red X on the menu bar of the datastore browser. You will be promted to confirm your actions! Congratulations you just removed an orphaned disk, now on to the next!







Diagnose Lync and OCS connectivity with the RUCT Tool

The guys over at Inside OCS have released an updated version of their great RUCT tool. I highly recommend you head over and check it out!

The new version now supports the Lync Mobile DNS records specifically:

  • Lyncdiscover.<domain.com>   (both CNAME or A record)
  • Lyncdiscoverinternal.<domain.com>  (both CNAME or A record)


The tool offers 4 primary features:

Easily Query Important DNS Records used by Microsoft Lync Server and OCS.   DNS queries for the following Lync and OCS records are issued:

  • All Lync and Communicator internal and external records used for automatic sign-in.
  • Lync sign-in records used for Lync Online (in Office 365).
  • Lync simple URL records used for Dial-In, Meetings, and Administration.
  • Home registrar location records used by Lync devices.
  • The automatic partner discovery record used in an Open Federation configuration.

Test Network Availability.

  • The hostname and port belonging to any matching DNS SRV record, or IP address belonging to an A record, can easily be tested for network connectivity.
  • A TCP connection is attempted for hostname’s and ports, and a ping is attempted for IP addresses.

Certificate Retrieval, Installation, and Export.

  • The tool can remotely retrieve X509 Certificate information on any Lync or OCS port that is secured using TLS (or SSL).  Certificate information returned includes the Common Name (CN), Subject Name, Issuer, Certificate Authority, Expiry Date, Creation Date, and Subject Alternative Names (SANs), and the complete certificate chain.
  • The remote certificate can also be installed locally or exported to a file.

Easily Retrieve Important Client-Side Troubleshooting Information.

  • Important client-side environment settings such as O/S version, 32-bit or 64-bit, current domain credentials, and Lync/Communicator sign-on settings are automatically retrieved and consolidated in one place.
  • Recent Lync and Communicator specific event log errors and warnings can be retrieved with one-click.

Definately one to add to your Swiss Lync Knife!