Pages

Tuesday, January 7, 2014

Script to backup ESXi configurations for all hosts in the cluster





This script is used to backup the ESXi configuration of all the hosts in the cluster. This backup will serve in the event if a VMware host has to be rebuild and if the configuration of a host goes corrupt  or compromised.This is a powershell script that requires the vmware powercli module.






#This script will backup the hosts Configuration


#Created By: Ruby Nahal

#run as scheduled task using the a service account that has 
#administrative rights on vcente. vcenter must have powercli installed

#this script creates the backup in D:\esxibackups and each backup is replaced # by the new one

# it also copies the backups to \\fileserver\share\backups



#Load the vmware powershell snapin

add-pssnapin vmware.vimautomation.core



#Connect to the vCenter Server

Connect-VIServer vcenter-01



#grab the list of hostnames

$esxihosts = get-VMhost | select name



#Print the list

Write-Output $esxihosts



#variable of type string to convert the object $esxihost to string value

[string]$esxihostname

Foreach ($esxihost in $esxihosts)

                {

                $esxihostname = $esxihost.Name

                Write-Output $esxihostname

                Get-VMHostFirmware -VMHost $esxihostname -BackupConfiguration -DestinationPath D:\esxibackups

                }

Copy-Item -Path D:\esxibackups -Destination \\fileserver\share\backups -Recurse -Force

Wednesday, January 1, 2014

How to disable the save password option on the Citrix Reciever from Citrix Storefront 2.0



When the users logged in using receiver for windows directly instead of using receiver for web (receiver for web is the webpage we access using the browser – the typical way we log on) it allowed you to save passwords and so next time you open it, you are already logged on to receiver. Bit too much of a security concern for us. The solution from citrix is to change a registry on the client computers which doesn’t quite work for us http://support.citrix.com/article/CTX134341. We wanted to do it at the infrastructure level and not at the client level. Although Citrix storefront did not provide this functionality out of the box, there is a workaround.



The following changes were made to the storefront servers to have the disable save password configured.

You can disable the ability to save passwords at the StoreFront level with the below instructions.

1.       Locate the Authentication service directory on disk under the IIS root folder.

e.g. “C:\inetpub\wwwroot\Citrix\Authentication”

2.       Open the file “\Views\ExplicitForms\Authenticate.aspx” in a text editor.

3.       Comment the following line

<% Html.RenderPartial(“SaveCredentialsRequirement”, SaveCredentials); %>



By replacing it with



<%-- Html.RenderPartial(“SaveCredentialsRequirement”, SaveCredentials); --%>



4.       Save the file.