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.

files_inside_the_computer

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
….STILL GREYED OUT

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….

facepalm

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

then…
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)
Next
End Sub

you are awesome!
you are awesome!

Quickly install features/components with Windows Powershell

Windows 2008 now comes packed with “windows powershell“, allowing administrators and engineers alike to access a powerful CLI more attuned to those that prefer a unix/linux environment. The powershell can be leveraged by customizing your os, administering your domain, or even managing multiple virtualization infrastructures. If you have not heard already, vmware’s powercli is basically a bunch of specially written cmdlets allowing IT staff to automate every portion of your vsphere implementation.

I was tasked with duplicating three production servers for a new staging environment within the same network. For this to occur, it would not be  as simple to just clone and sysprep. For various reasons, I decided to clone from a template, configure the basics, install features, and deploy app/db specific software. The only portion of this that would be time consuming would be getting the roles and features to be the same from production to staging.

Let’s get this done in under two minutes.

Make certain you have opened powershell with admin/elevated rights

• Step 1: Run PowerShell with the ServerManager module:

1
import-module servermanager

• Step 2: Export the list of currently installed features to XML

1
Get-WindowsFeature | ? { $_.installed } | Export-Clixml \\server\share\features.xml

• Step 3: On second server, run PowerShell and import XML

1
$f = Import-Clixml \\server\share\features.xml

• Step 4: Pipe that bad boy into Add-WindowsFeature!

1
$f | Add-WindowsFeature

• Step 5: Restart, if needed

1
Restart-Computer

• Step 6: Go eat a sandwich

1
mmmmmmm

After this was completed, I ran the installers for the app/db software and passed back to the client’s dev team for specific data load and deployment.

You can get creative with these types of one-liners when you start making your own scripts and go really nutty with it. For now, this just shows some basic tasks that could potentially save you anywhere from 30 to 90 minutes depending.

-Anton

Force group policy updates on all Active Directory Domain Members

If you are a windows administrator, at one time or another you have been ready to pull out your hair when you realize Microsoft doesn’t always supply some of the most basic utilities. One of these basic functions is to force a group policy update on all domain member computers. You can change the update interval, script the changes, manually enact the change on each computer, or leverage some really amazing, free tools.

Sysinternals, a company acquired by Microsoft in July of 2006, provides a software suite of various utilities to assist you. In this example, I will run a command as a domain administrator to enumerate all domain members, force a remote group policy update, and provide the output results:

“psexec.exe -i -s \\* gpupdate.exe /force”

…thats it! Quick, easy, and painless.