Use kerberos ticket to mount CIFS shares on a Linux server. You do not need to know the password for the account, nor have the password stored in a file. Create the keytab file for the account my-account, this step…
Change the IP address of a Windows servers with VMware PowerCLI script
VMware vSphere PowerCLI 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…
Find VMware Guests with Raw Physical Disks
VMware vSphere 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
VMware PowerCLI script to list snapshots older than specific days
A VMware vSphere 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…
Configure VMware Datastore Multipath Policy by Disk Type
Here is a VMware vSphere 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…
Configuring SNMPv3 client on Red Hat Linux
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…