Geeks Hangout

Tips, scripts and fixes I have found as a Systems Administrator


Problem:

I just tried to install VMware vCenter 6 Update 1 on a lab server, however my lab server barely failed the minimum requirements for RAM. VMware vCenter Server detected 8005MB of memory. 8176MB of memory is required for the selected deployment type

VMware vCenter Server detected 8005MB of memory. 8176MB of memory is required for the selected deployment type

Workaround

As this was a non production server I did not want to add more RAM just because I was 171Mb short. So instead I went about modifying the the hardware requirements using a MSI transform file.

This is what I did;

  1. Mounted the VMware-VIMSetup ISO image
  2. Opened the the vCenter-Server\VMware-vCenter-Server.msi in the Microsoft MSI database editing tool Orca
  3. Under the Transform menu selected “New Transform”
  4. Under the “HardwareRequirements” table I changed the memory value for the rows embedded and management from 8176 to 8000

8gb ram_pre

8gb ram_post

  1. Under the Transform menu selected “Generate transform” and saved the MST file
  2. Opened a command prompt and ran the vCenter-Server\VMware-vCenter-Server.exe installer along with my transform file.

vmware_8Gb_run

Notes

I have not noticed any adverse effects, I performed this change on a non production lab server I would not recommend this is used for a production server.

Read More

The below VBS script will run a command on all computers in the Active Directory OU defined by LDAPPath =

The script depends on the Windows Sysinternals tool PsExec, you will need to download and exact PsExec and place in in the same folder as the script.

In this case I am using the script and PsExec to run the command “IPConfig /flushdns” on all computers in the my “Servers” OU, the script could easily be adapted to to run something different.

 

Read More

The below PowerShell script queries a remote computers event log to retieve the event log id’s relating to Logon 7001 and Logoff 7002. Creating a nice little audit of when the computer was logged on and off.

At the bottom of the script you will need to change the computer name and you can change the number of days if required.

The remote computer will need to be online and the “Remote Registry” service needs to be started, this can be done remotely using service.msc and selecting “Connect to another computer” in the actions menu.

Read More

The below script will find the screen aspect ratio of a computers primary video controller by querying WMI.

The script stores the horizontal and vertical resolution for each video controller in an array and returns the result of dividing the horizontal by the vertical for the first controller. If the computer has any other controllers there resolutions will also be in the array.

You could modify this script and use it for a few different purposes, I have used this method to deploy wallpapers to computers with the correct aspect ratio.

Read More

Problem:

A remote user had forgotten their password, so they phoned our Service Desk to get it reset. The user did not have a direct connection to the domain so their cached credentials were still holding the forgoten password preventing the user logging on.

The below is what I did to resolve the issue, it relied upon having a local account or someone elees pre cached credentials the user could log on with.

Solution:

  • As part of my laptop builds I create a local standard user which comes in usful in situtauions like this, I gave the user the details for this recovery user and got them to log on.
  • I got them to VPN in using their Cisco Anyconnect Client
  • I could now remotly connect to the laptops
  • Under Contol Panel => System => Remote settings I enabled Remote Desktop and added the user to the list of user that con connect.
Read More

Problem:

On my Ubuntu 15.10 laptop I found TAB key completion was not working in the bash shell / terminal.

Solution:

I started by checking the basics;

  • Running echo $SHELL confirmed I was indeed using a bash shell.

Ubuntu - Shell TAB key completion not working

  • Running dpkg -s bash-completion confirmed bash-completion package was installed.

Ubuntu - Shell TAB key completion not working

  • Next I took a look at the /etc/bash.bashrc file and I found the section to “enable bash completion in interactive shells” had been commented out for some reason. It is not something I would have knowingly done, so the reason why the section was commented out is a bit of a mystery. If you have any ideas, please comment.
  • I changed the section from;
Read More

Problem:

Over the past week or so I have been getting reports from users that they have started to be prompted for proxy authentication when opening Skype for Business. If they cancel the prompt Skype seems to work fine and likewise if they enter there details Skype continues on its way. Out of curiosity and to prevent our users being prompted at all a did some digging.

Skype Proxy Autentication

Solution:

Finding the Hosts / URL’s

My tool of choice for troubleshooting unwanted proxy authentication prompts is Wireshark.

  • I completed closed Skype
  • Started a capture in Wireshark
  • Reopened Skype and was greeted by the proxy authentication prompt, so I stopped the Wireshark capture.
  • I applied the display filter http.proxy_authenticate to just show me data replated to proxy authentication

Wireshark Proxy authentication

  • The display filter returned two results, on each on in turn I right-clicked and selected “Follow TCP Stream” and captured the “Host”

skype_proxy_auth_05

skyoe_proxy_auth_03    skyoe_proxy_auth_04

  • The hosts having trouble with proxy authentication in my case were go.microsoft.com and images.edge.messenger.live.com

Bypassing Proxy Authentication

My proxy server is a “Clearswift Secure Web Gateway” the way you bypass proxy authenation varies on the proxy server.

Read More

The below short script will return a count of the number of tables in a database.

Make sure to change the “use” statement to the required database name

Read More

Pin It on Pinterest