Change the IP address of a Windows servers with PowerShell script

April 27, 2016
By

Microsoft PowerShell script to change the IP addresses of Windows servers. $TranscriptFile = “.\change-ip-2.txt” #Stop-Transcript Start-Transcript -Path $TranscriptFile $windowsID = “administrator” $windowsPassword = “MyPassword” Function Set-WinVMIP ($VM, $IP, $SNM, $gateway){ $nics = Get-VMGuestNetworkInterface -VM $VM -GuestUser $windowsID -GuestPassword $windowsPassword | ?{$_.ip -ne $null} Write-Host “Changing IP for $VM to $IP” -BackgroundColor DarkBlue Set-VMGuestNetworkInterface -vmguestnetworkinterface...
Read more »

Find VMware Guests with Raw Physical Disks

February 27, 2016
By

VMware PowerCLI script to find all guests that have RDMs or raw physical disks. $Servers=”vcenter1″ Connect-VIServer $Servers $vms = get-cluster | get-vm Get-VM | Get-HardDisk -DiskType “RawPhysical”,”RawVirtual” | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | out-gridview -PassThru | Export-Csv -Path .\vm-with-rdm.csv
Read more »

VMware PowerCLI script to list snapshots older than specific days

July 27, 2015
By

A VMware PowerCLI script to find and email a list of all VMware guests that have snapshot older than 3 days. # List all VM with snapshots # Run as scheduled task with a user with rights to view all VMs Add-PSSnapin VMware.VimAutomation.Core $Age...
Read more »

Configure VMware Datastore Multipath Policy by Disk Type

May 27, 2015
By

Here is a VMware PowerClI script that will find all datastores that are of the model Hitachi – Open-V, set the multipath policy to RoundRobin if it is anything else. $clustername = ‘clustersomething’ $datastore = get-datastore # Find datastores by HITACHI, model OPEN-V and...
Read more »

Configuring SNMPv3 client on Red Hat Linux

January 27, 2014
By

To configure snmp client version 3 on a Red Hat server you will need to install the packages net-snmp-utils and net-snmp. yum install net-snmp-utils net-snmp Make sure the snmpd service is stopped before you can configure it. service snmpd stop Create a new SNMPv3...
Read more »

Add new disk to Red Hat Linux server, create new filesystem without reboot.

January 27, 2014
By

If you are running a VMware virtual Red Hat Linux server then it is very easy to add a new disk. For physical servers with hot add capability this is also possible. I am going to show you how to add a new disk...
Read more »

VMware converting RAW disk to VMDK

August 28, 2013
By

Convert a Vmware RDM disk to VMDK while guest VM is powered off Power down the guest VM Clone the VM, under select virtual disk format – select Advanced – change the disk format to Thick provisioned. You only need to do this step...
Read more »

Expanding VMware virtual IDE disk for Windows XP

November 30, 2012
By

In VMware ESX 4.x the default disk type for Windows XP 32bit virtual machine is IDE. If you did not size your drive correctly, you will be unable to expand this virtual disk later using the VMware management client. But if you had selected...
Read more »

Script to power down many Windows servers

November 14, 2012
By

If you ever have the need to power down hundreds of Windows servers, then here is a script to do just that. This script will work for Windows 2000, 2003 and 2008. The servers will shut down gracefully. for /F %%a in (names.txt) do...
Read more »

Configure the DVD or Linux ISO as software repository for Red Hat Enterprise Linux

September 7, 2012
By

You downloaded and installed Red Hat Enterprise Linux on your server becasue you just want to test it out. During installation you selected base server, after installation you realize that you need to install additional packages. But since you did not purchase the Red...
Read more »

SSH Login without password using public key authentiation

August 23, 2012
By

On Computer A Create the public and private keys using the command ssh-keygen # ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification...
Read more »

How to extend the filesystem on a Vmware ESX guest Red Hat Linux server

May 26, 2011
By

Being the administrator of a large Linux shop, I have had to extend the filesystems on the Red Hat Linux server a few times. Each time I had the opportunity to extend the filesystem, I found that I struggled to remember the commands and...
Read more »

Unable to login to remote server via ssh

May 18, 2011
By

A funny thing happened to one of my Red Hat 5 Enterprise servers after applying the errata. I rebooted the servers as usual after applying the updates, and they came up just fine. But unfortunately I was not able to logon remotely via ssh...
Read more »

How to create a new superuser in Linux

May 17, 2011
By

The administrative account ‘root’ is the most powerful user in Linux and Unix. This account is created by default during installation of the operating system. Most security consultants will recommend that the root account be deleted or renamed. This is to make it harder...
Read more »

Troubleshoot problem with yum update and rebuild the rpm database

March 15, 2011
By

I have created a step by step approach to troubleshoot a problem with performing yum update and how to rebuild the rpm database. I received and error while trying to update the Redhat Enterprise 5 server kernel using yum update. Looking at the output...
Read more »