List All VM’s with snapshots – “One-liner Wednesdays”

Here is a quick way to list all of your virtual machines’ snapshots that are managed through the vCenter you are currently connected to.

get-vm | get-snapshot | select vm,powerstate | Out-GridView

I like using the “Out-GridView” cmdlet because it allows you to quickly filter the list. This is excellent when you want to sort specific types of vm’s. Example: “app”, “db”, “web” etc.

VMware PowerCLI Documentation
Microsoft PowerShell Documentation

Hindsight is 1024×768

Ever go through a bunch of “deep” steps in troubleshooting, only to realize the answer was right in front of you the whole time? This is my story.


While testing a new gui based app via RDP, I was presented with a warning prompt on app launch that cited a resolution requirement of at last 1024×768….My local display is at least this resolution, so Microsoft RDP should adjust accordingly. The app would launch as normal after clicking the sacred “ok” button. *scratch head* I need this warning to go away before testing/validation by said application owners.

My immediate reaction was to check the resolution. The drop-down was greyed out. I rebooted the box and was still unable to change the setting. After a quick google, I stumbled upon a KB article to increase the vRam size and tweak display settings at the hypervisor level…
VMware KB: “Adding video resolution modes to Windows guest operating systems”
After modifying the svga options in the vmx file and booting the vm back up…I was still unable to change the windows drop-down. This rules out any hypervisor based resource issue, I suppose.

At the bottom of the aforementioned KB, was another link/KB, aptly named “Increasing virtual machine display resolution to a custom resolution beyond the maximum resolution listed in Microsoft Windows” There is ACTUALLY a small utility that you can invoke, if and when display settings are unavailable in windows.

From an elevated command promot, I set it to my desired resolution and reboot.
VMwareResolutionSet.exe 0 1 , 0 0 1024 768

I sit back in my chair and stare at my screen for a moment and it dawned on me…. I have been testing the whole time using MS Remote Desktop Connection Manager and not the traditional RDP!

I connect using a normal RDP session and BAM!!! The app friggin works without prompt. The display settings are showing my resolution. Also, as NOW expected, the settings are greyed out.

RDP connection manager was forcing my display in it’s mirrored/server listing view mode and causing the issue the whole time. I learned some cool stuff about vmware, was reminded of some simple RDP display principles, but ultimately….


Extending a NetApp SnapMirror source/destination volume

I recently had a request from a client to extend an nfs volume living on a NetApp FAS6220. The volume is utilizing SnapMirror technology to replicate volumes to a DR site.
In this example, we show how to extend the volume by 100GB and ensure SnapMirror continues to function.

1. SSH into both source(Production) and destination(DR) controllers
2. On destination (DR site):
snapmirror break
vol options fs_size_fixed off
vol size +100g
vol options fs_size_fixed on

3. On source (Production Site):
vol size+100g
4. Back on destination (DR site):
snapmirror resync
Answer yes at prompt to confirm

5. Refresh your ESXi shared storage

List HA reboots within the past 5 days – PowerCLI

    On 4.1

$Date = Get-Date
$HAVMrestartold =5
Get-VIEvent -maxsamples 100000 -Start ($Date).AddDays(-$HAVMrestartold) -type info | Where {$_.FullFormattedMessage -match "was restarted"} |select CreatedTime,FullFormattedMessage |sort CreatedTime -Descending

    On 5.x

$Date = Get-Date
$HAVMrestartold =5
Get-VIEvent -maxsamples 100000 -Start ($Date).AddDays(-$HAVMrestartold) -type warning | Where {$_.FullFormattedMessage -match "restarted"} |select CreatedTime,FullFormattedMessage |sort CreatedTime -Descending

Documenting VMware IP’s via PowerCLI – “One-liner quickies”

I am finishing up the new VMware lab at work and need to document the setup. Part of this documentation includes getting all the ip’s on each VMhost and their corresponding use. A quick and easy way to do this is to leverage the awesomeness of PowerCLI.

So, here is a great one-liner that requires little post formatting to get what you need:

Get-VMHostNetworkAdapter | select vmhost,portgroupname,ip | Export-Csv c:\YourDirectory\network.csv

Make all text in MS Excel 2013 capitalized using a VBA script

first off…
Show the Developer tab
– Click the File tab
– Click Options
– Click Customize Ribbon
– Under Customize the Ribbon and under Main Tabs, select the Developer check box.
….now you have this
excel bar_dev-tab

Create a macro by using VBA
On the Developer tab, in the Code group, click Visual Basic.
If needed, in the Visual Basic Editor, on the Insert menu, click Module.
NOTE Modules are automatically created for all sheets in the workbook.

– In the code window of the module, type or copy the macro code* that you want to use.
– To run the macro from the module window, press F5.
– In the Visual Basic Editor, on the File menu, click Close and Return to Microsoft Excel when you finish writing the macro.

Sub Uppercase()
For Each x In Selection
x.Value = UCase(x.Value)
End Sub

you are awesome!
you are awesome!

forticlient webfilter bypass

So this new gig I have has a bunch of clients with the forigate/net product line and I installed the forticlient…I wanted to do quick/simple VPN to work on our customers’ networks. Upon installing I realized I was blocked from certain websites… I was sitting in my car outside the datacenter on the 4g hotspot… ALAS! the vpn client installs a webfilter and defaults rules…with configuration that I cannot change!!!

Found the service and was unable to disable/stop… tried with process explorer and process hacker (google that ish). That didn’t work and something in the background kept starting the software suite. Thought I would be clever and run cmd.exe as the system service via pstools to stop the service(psexec -i -s cmd.exe…sc stop etc.)…. access denied.


Then I realized it’s windows and I WILL HAVE TO REBOOT and change all that crap. ugh… gotta open the 5 million tabs in chrome and get my music right…


  1. Find out what sys file the filter is using (searched in process explorer and found Fortiwf2.sys)
  2. Reboot into safe mode, set the software service to manual and rename Fortiwf2.sys to Fortiwf2.old
  3. Start normally and when I want to vpn , start the service