Life of a Geek Admin

The Daily adventures of a true geek administrator

Life of a Geek Admin - The Daily adventures of a true geek administrator

How to Fix Flash Player Crashing on Firefox 20

After a recent upgrade of Firefox to 20.01 Adobe Flash player starting crashing on sites. After Googling around I found that most were saying to upgrade or downgrade Flash. Tried them all with no change until I ran across a suggestion to install the debug version of Flash which did the trick.

Download the Windows Flash Player 11.7 Plugin content debugger (for Netscape-compatible browsers) (EXE, 17.21MB) and install and that’s it!

Disappearing Space on Windows 2008 R2 Caused by System Volume Information and Shadow Copies

Recently ran into an issue where a 400 GB drive was showing low space but looking at the files found that only 20 GB was being consumed. Upon checking on the drive turned on show hidden on the server in a folder called System Volume Information.

The System Volume Information folder is a hidden system folder that the System Restore tool (XP, Vista/7/8) uses to store its information and restore points, it is also used by shadow copies for  backups and other purposes on Windows 2003/2008 and 2012. There is a System Volume Information folder on every partition on your computer.

So how do you reclaim the space, well there are two ways either through the GUI or the command line to recover space that system restore is not using. Special Note: if you do this on SQL servers it will stop the MSSQL service.

CLI Method

Open a command prompt with the “Run as Administrator” option. Type in vssadmin list shadowstorage

vss1

As you can see the output shows used Space, Allocated Space and Maximum Space.

We can also see what available restore information is available by running vssadmin list shadows

vss2

So now let’s get to reclaiming the space on one of the drives. In the issue I had with disappearing space was with the F:\ drive. So to reclaim it I want to resize the maximum allocated space setting to 1 GB. The syntax is:

vssadmin resize shadowstorage /on=[here add the drive letter]: /For=[here add the drive letter]: /Maxsize=[here add the maximum size]

For Example:

vssadmin resize shadowstorage /on=F: /For=F: /Maxsize=1GB

vss3

To validate the changes took run vssadmin list shadowstorage.

vss4

Repeat the steps to make the changes to other drives and the space will be recovered.

GUI Method

Double click on Computer to see your drives. Right click on the drive in question and select Properties. Click on the shadow copies tab.

vss5

Select the drive in the list and click on the settings button. Check the Use Limit box and type in the amount in MB to which you want to set (1024 for 1GB) and click OK. Repeat for other drives until completed.

vss6

You are all done and now have more space.

 

How to clear ARP Cache in Windows 2003 / 2008

There are many tools and different ways to troubleshoot TCP/IP network issues. One of those steps could involve clearing the ARP (Address Resolution Protocol) cache. One area where clearing the ARP cache can help is if you are seeing web pages not loading, ability to ping certain IP addresses.
Clearing the ARP cache is easy to do. Open a a command prompt Start > Run > type cmd and click OK. Enter in the following command.

netsh interface ip delete arpcache

It will  take 2 – 20 minutes for the ARP cache to update on the server.

To display the ARP cache type

arp -a

To delete an address from the ARP cache type

arp -d <ip_address>

Add static entry to ARP table

arp -s <ip address> <mac address>

Example

arp -s 192.168.1.20 00-cc-00-61-f6-19

 

How To Fix VMware Error IP address already assigned to another adapter

There has been times when you have deleted a NIC in VMware and to the eye it looks like it is gone but really it is still there and it rears it’s ugly head when you try to re-add it to a Windows VM. You will receive errors similar to the following.

The IP address XXX.XXX.XXX.XXX you have entered for this network adapter is 
already assigned to another adapter Name of adapter. Name of adapter is hidden 
from the network and Dial-up Connections folder because it is not physically in
 the computer or is a legacy adapter that is not working. If the same address is 
assigned to both adapters and they become active, only one of them will use this address. 
This may result in incorrect system configuration. Do you want to enter a different 
IP address for this adapter in the list of IP addresses in the advanced dialog box?

XXX.XXX.XXX.XXX is usually the IP address of the system you are working on. According to VMware support this error can occur also if

  • You have upgraded VMware virtual network adapters (for example, when you migrate a virtual machine from an older to a new version of VMware software).
  • You have added and removed network adapters multiple times.
  • You may see this if you recently performed a P2V and the resulting virtual machine still has the physical NICs and drivers for those NICs present. These ghost NICs have the old IP address and the virtual NIC cannot be assigned the same IP address.

This issue occurs if a network adapter with the same IP address is in the Windows registry but is hidden in the Device Manager (My Computer > Properties > Hardware > Device Manager). This hidden adapter is called a ghosted network adapter.

Using the Show hidden devices option in the Device Manager (View > Show hidden devices) does not always show the ghosted adapter to which that IP Address is assigned.

So how do we fix it? First make the ghosted network adapter visible in the Device Manager and uninstall the ghosted network adapter from the registry:

  1. Click Start > Run.
  2. Type cmd and press Enter.
  3. At the command prompt, run this command:
set devmgr_show_nonpresent_devices=1

Note: If this command does not work (a possibility in Windows Server 2000 and 2003), you may need to add the parameter to Windows and set its value:

a. Right-click the My Computer desktop icon and choose Properties.
b. Click the Advanced tab and select Environment Variables.
c.  In the System variables section, click New.
d.  Set the Variable name to devmgr_show_nonpresent_devices and set the Variable value to 1 to enable the parameter.
e.  Click OK to add the variable to Windows.

4. Start the Device Manager by running this command from the same command prompt:

start devmgmt.msc

5. Click View > Show Hidden Devices.
6. Expand the Network Adapters tree (click the plus sign next to the Network adapters entry).
7. Right-click the dimmed network adapter, then click Uninstall.
8. Once all of the grayed out NICs are uninstalled, assign the IP address to the virtual NIC.

Note: To assign the IP address to the virtual NIC on the command line, run the command:

netsh interface ip set address "Local Area Connection #" static IP_Address Subnet_Mask Default_Gateway

For example:

netsh interface ip set address "Local Area Connection 2" static 192.168.1.101 255.255.255.0 192.168.1.1

9. Close the Device Manager.

That should fix the issue stopping you from adding a new NIC in your VM.

How To Enable Named Pipes and TCP/IP for Microsoft SQL Server 2008 R2 SQLExpress

During a recent installation of HP Insight Manager 7.1 on Windows 2008 R2 server the prerequisites failed complaining about you must enable named pipes and TCP/IP for the existing database service Microsoft SQL Server 2008. After a default install they are usually disabled. This applies to Microsoft SQL Server 2008 Express as well.

To enable named pipes and TCP/IP for Microsoft SQL Server 2008

Click Start > All Programs > Microsoft SQL Server 2008 R2 > Configuration Tools > SQL Server Configuration Manager.
Under SQL Server 2008 Network Configuration > Protocols for MSSQLSERVER:

Double-click the protocol name TCP/IP and set the property ENABLED to Yes.
Double-click the protocol name Named Pipes and set the property ENABLED to Yes.

sqlexpress1
Next we will need to restart mssqlserver service, type the following commands in the command prompt window.

net stop mssqlserver
net start mssqlserver

And that’s all there is to do.

How To Remove Sleep Option from the Vista Shutdown Menu

Recently ran into an issue with a Windows Vista desktop system that the client kept putting the system to sleep with the desktop and was causing issues. If this was a laptop I wouldn’t want to remove the Sleep option from the menu, but being a desktop it was not such a big issue.

  • Click Start, Run
  • Type “regedit”
  • To disable sleep for all users, go to HKey_Local_Machine\Software\Policies\Microsoft\
  • In the right pane, right click and choose New > Key and type Power
  • Create another key, in the right pane, right click and choose New > Key and type PowerSettings
  • Create a final key in the right pane, right click and choose New > Key and type abfc2519-3608-4c2a-94ea-171b0ed546ab

nosleep

  • Now, in the right pane, right click and choose DWord (32 bit)-value and type ACSettingIndex
  • Double click the new entry and set it’s value to 0 (Hexadecimal)
  • Reboot or logoff and logon and sleep is gone from the shutdown menu.

nosleep2

If you want to put the sleep option back all you have to do is delete the HKey_Local_Machine\Software\Policies\Microsoft\Power key.

Installing Oracle 11g Client on Windows

In this post we will cover how to download and install the Oracle 11g client on Windows for 32 and 64 bit installations.

First you will need to download the 32 or 64 bit version from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html for which you will need to have a Oracle account to get the files. This is a free account and is an easy sign up.

Once you have downloaded the client extract it in a directory and click on the setup.exe file under the win32_11gR2_client\client\ or win64_11gR2_client\client\ directory. The installation process is the same if it is 32 or 64 bit.

The next piece of the install depends on what the client will need to do. Each option explains what it will provide, if you have the disk space I recommend using the Administrator option (1.04G), for this post that is what I have chosen.

The Oracle installation wizard will start. Select Administrator for the installation type and click next.

oraclewin1
Click next on the Select Product Languages screen.

oraclewin2
The next step is import as the installer will try to install the client to your home directory. Change the Oracle base to be C:\oracle and click next when completed.

oraclewin3
The prerequisites checks will run and you will proceed to a Summary page if all looks good. You will see there is an option to Save Response file, you can save it if you wish to run a silent install of the client, otherwise click Finish.

oraclewin4
Installation will progress and will take time to complete.

oraclewin5
Click Close when the client install is completed.
If you have a tnsnames.ora you can copy it to the C:\oracle\product\11.2.0\client_1\network\admin directory. If not you will need to run the client configuration utility.
For cleanup delete the zip file and the unzipped files in the extracted directory.

Uninstall Process
To remove the Oracle client you need to execute the deinstall process by double-click on C:\oracle\product\11.2.0\client_1\deinstall\deinstall.exe. This will open a command window. Accept the defaults and Oracle will uninstall itself. Delete the c:\oracle directory to clear the remnants after completed.

Can’t find script engine “VBScript” for script error on Windows 7 and Windows 2008

We had recently received an error when upgrading a product and the script used for the upgrades was VBScript. When running the script there was a few systems that displayed the following error.

“Can’t find script engine “VBScript” for script “<path to script>”

vbscripterr

Upon doing a bit of digging I found that most times this error is resolved by re-registering the vbscript.dll. We ran the following commands.

  1. Click on start button, type cmd. In the search result right-click on cmd and selectRun as administrator.
  2. Type cd %windir%\system32 and press enter.
  3. Type regsvr32 vbscript.dll in command prompt and press enter.

If the registration was successful, you should now see the following message:
DllRegisterServer in vbscript.dll succeeded.

On some of the servers this fixed the issue and scripts ran again. On the systems that still didn’t work did a bit more digging and found that a recent McAfee upgrade changed a registry key for vbscript. Here’s how to correct it.

  1. On the problem machine, log in as an administrator.
  2. Open the registry editor (regedit.exe) and navigate to the following registry key.[HKEY_CLASSES_ROOT\CLSID\{B54F3741-5B07-11cf-A4B0-00AA004A55E8}\InprocServer32]
  3. check the path of the Default registry key, it will most likely point to the path of your Anti-Virus Product.
  4. Right click on InprocServer32 and select permissions. Give the Administrators group full access.
  5. Then Modify the Default registry key and change the path to C:\Windows\system32\vbscript.dll
  6. Change the permission back.

vbscripterr3

After making the change vbscript’s started running again!!

 

How to move or back up your personal folders file in Outlook

Recently I ran into an issue where a client needed to create a new personal folder file in Outlook 2007 due to the growing size of his current one. The old one was to be saved and a new one created and have Outlook pointed to use the new one. Here is how that was achieved.

Find your Personal file and back it up
Microsoft Office Outlook 2003 through Microsoft Office Outlook 2007

  • Start Outlook.
  • On the Tools menu, click Options.
  • On the Mail Setup tab, click the Data Files button. Note the path and file name of your .pst file. For example, C:\Documents and Settings\<username>\mail.pst indicates a .pst file that is named mail.pst located in the Documents and Settings\<username> folder on your drive C. This will be C:\Users\<username> for Windows 7.
  • Click Close, click OK, and then click Exit and Log Off on the File menu to quit Outlook.

How to copy your personal folders file
For Windows XP
On the Start menu, point to Programs, and then click Windows Explorer.
Browse through the files to the location of your .pst file determined from above steps. Copy your .pst file to the location that you want.

For Windows 7
Click the Windows button > All Programs > Accessories > Windows Explorer or click on Libraries icon in the toolbar. Browse through the files to the location of your .pst file determined from above steps. Copy your .pst file to the location that you want.

Point Outlook to your new personal folders file
Microsoft Office Outlook 2003 and Microsoft Office Outlook 2007

  • Open Outlook.
  • On the Tools menu, click Options.
  • On the Mail Setup tab, click the E-mail accounts button.
  • On the Data Files tab, click Add.
  • Click Office Outlook Personal Folders File (.pst), and then click OK.
  • Find the new location for your .pst file, and then click OK two times.
  • Click Set as Default.

If this is your default e-mail delivery location, you will receive the following message:

You have changed the default deliver location for your e-mail. This will change the location of your Inbox, Calendar, and other folders. These changes will take effect the next time you start Outlook.

  • Click OK.
  • Click the .pst file that was identified in location of your personal folder file and then click Remove to remove the local .pst file from your profile if you want to remove it or leave it in the list.
  • Click Yes, click Close, and then click OK to close all dialog boxes.
  • On the File menu, click Exit.
  • Restart Outlook.

If the .pst is your default delivery location, you will receive the following message:
The location that messages are delivered to has changed for this user profile. To complete this operation, you may need to copy the contents of the old Outlook folders to the new Outlook folders. For information about how to complete the change of your mail delivery location, see Microsoft Outlook Help. Some of the shortcuts on the Outlook Bar may no longer work. Do you want Outlook to recreate your shortcuts? All shortcuts you have created will be removed.
Click Yes to have Outlook update the Outlook Bar shortcuts so that they point to your new .pst file location, or click No to leave the shortcuts for your original local .pst file.

Your profile now points to your .pst file in the new location.

 

How To Install clusterssh on Cygwin

ClusterSSH is just one of those handy tools for making changes to many servers at once. A very nice tool for a systems administrator to have. If you are in an enterprise situation where your system is a Windows system and you maintain Linux / Unix systems you ave a few options to manage your systems like VirtualBox, Cygwin, puTTy and many more. Of the ones I mentioned only VirtualBox and Cygwin are ones that ClusterSSH is a option to run.
Cygwin does not have a package available so it must be compiled and installed.

First make sure to install Cygwin. If you have Cygwin installed then there are several other packages you need to install.
clusterssh requires X11, tcl-Tk and a few perl packages

Start Cygwin setup.exe and select the following. Note vim is not needed you can install nano or any other editor.

  • Archive/unzip
  • web/wget
  • net/ncftp
  • utils/gnupg
  • Devel/gcc-core
  • Devel/binutils
  • Devel/make
  • Devel/patchutils
  • X11/xorg-server
  • X11/tcl-tk
  • X11/X-start-menu-icons
  • Editors/vim
  • Perl/perl-Tk

CPAN modules install
First start an X11 Server session. Since we installed X-start-menu-icons you will have a shortcut under All Programs>Cygwin-X called XWin Server. Click on it to start it or open a Run or command prompt and type C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin.exe.
The Xserver will start and it will also load a xterm session which you can close.

Open a Cygwin Terminal session and type the following commands:

cpan X11::Protocol
 cpan Exception::Class
 cpan Try::Tiny
 cpan Readonly
 cpan Test::DistManifest
 cpan Test::Trap

cygwincssh1

If you have never used cpan a configuration and update wizard will run first. If you accept the default and press enter it will configure it all for you. Once that is done and X11::Protocol starts a test X11 window will popup. Just click in the window to close it and the installation will complete.

ClusterSSH Install

Now we are ready to download App-ClusterSSH-4.01_01
Download 4.01 from http://sourceforge.net/projects/clusterssh/files/2.%20ClusterSSH%20Series%204/

Extract the file change to the extracted directory and type

$ tar -xvzf  App-ClusterSSH-4.01_01.tar.gz

cygwincssh2

To install this module, run the following commands:

perl Build.PL
 ./Build
 ./Build test
 ./Build install

cygwincssh3
Now you are ready to go. Open an xterm window and start using ClusterSSH!

Switch to our mobile site