Trigger e-mail when user RDP to vCenter server.

We have strict logon policy on VMware Management servers like vCenter, View connection brokers etc. We have been looking for a solution to get alerts when someone RDP to the Management Servers (all are Windows 2008/2012).

Combination of Windows Task Scheduler and PowerShell script did the tick.

1. The following Powershell script “Get-RDPUser.ps1” will get the last terminal server (RDP) session details and send e-mail to the team in HTML table format.

Continue reading

VMware Cloud Cred. Its real fun!!

Cloud Cred is a professional peer-based ranking system that makes it easy to identify the most credible, up-to-date and follow-worthy experts on cloud computing. Participants earn points for activities that demonstrate cloud knowledge, which is expressed as a numerical Cloud Cred score and a level of mastery. Achieving a certain Cloud Cred score also unlocks various rewards and incentives.
Continue reading

PowerCLI to see the windows guest IPv4 Network Details.

Its a tiny script to find the IP address, DNS and WINS server of a windows VM. Its an example for invoking guest scripts through PowerCLI.

[crayon lang=”powershell”]

Connect-VIServer vcenterserver1

get-vm -Name vmname | %{
$_.Name; $_ | Invoke-VMScript -GuestUser “test” -GuestPassword “test” -ScriptType Bat -ScriptText “netsh interface ipv4 show addresses” -HostUser “test1” -hostpassword “test1”
$_.Name; $_ | Invoke-VMScript -GuestUser “test” -GuestPassword “test” -ScriptType Bat -ScriptText “netsh interface ipv4 show dnsservers” -HostUser “test1” -hostpassword “test1”
$_.Name; $_ | Invoke-VMScript -GuestUser “test” -GuestPassword “test” -ScriptType Bat -ScriptText “netsh interface ipv4 show winsservers” -HostUser “test1” -hostpassword “test1”
}

[/crayon]

Save few seconds when you connect to the View desktop.

By adding few parameters to View Client shortcut we can save some time daily while connecting to the desktop. Follow the below mentioned steps if the domain login credential for View desktop and local machine are same.

1. Right click the View Client shortcut and select Properties.
2. If the View client installation is done at the default directory then the Target will be like this.

“C:\Program Files\VMware\VMware View\Client\bin\wswc.exe”

Append parameters  -loginascurrentuser, -server, -desktopname  and -interactive to Target.
Continue reading

PowerCLI sccript for exporting VM details to HTML

Its a simple script for exporting VM details to HTML format. The HTML report created will be saved into the folder with the name of current month. It will help in generating a daily report with the help of Windows Task Scheduler. Refer this article for scheduling PowerCLI script.

Following details will be collected.

1. No of VMs in the vCenter.
2. No of Hosts connected in vCenter.
3. PowerState of VMs, IP address, Base ESX host, Cluster Name.
Continue reading