PowerShell: XenApp Server Performance

I wrote a simple PowerShell script to monitor the real time performance (CPU usage, Memory usage and Disk queue length) of the XenApp farm servers. To make it work, you need to: 1) Download and install the XenApp Powershell SDK. 2) Ensure the 'Citrix XenApp Commands Remoting' service is running on the data collector server. … Continue reading PowerShell: XenApp Server Performance


ESXi PowerCLI Enable ssh service

1) Enable SSH service on all ESXi hosts.Get-VMHost | Foreach { Start-VMHostService -HostService ($_ | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} ) }2) Enable SSH service on a single host.Start-VMHostService -HostService (Get-VMHostService -VMHost ESXi-01.my.lab | where {$_.Key -eq "TSM-SSH"})

Check Virtual Machine UUID

Each virtual machine is automatically assigned a universally unique identifier (UUID), which is stored in the SMBIOS system information descriptor. It can be accessed by standard SMBIOS scanning software (for example, SiSoftware Sandra or the IBM utility smbios2) and is used for system management in the same way you use the UUID of a physical … Continue reading Check Virtual Machine UUID

PowerCLI: Check ESXi Scratch Location and Syslog Server Settings

As part of the ESXi health check, we need to ensure the scratch location and syslog server has been configured correctly. Here is my script to check the settings: $VMHost = Get-Content C:\powercli\Servers.txt Foreach ($_ in $VMHost) {$Scratch = Get-VMHostAdvancedConfiguration -VMHost $_ -Name ScratchConfig.ConfiguredScratchLocation $SyslogServer = Get-VMHostAdvancedConfiguration -VMHost $_ -Name syslog.global.loghost$SyslogDir = Get-VMHostAdvancedConfiguration -VMHost $_ … Continue reading PowerCLI: Check ESXi Scratch Location and Syslog Server Settings

VMware vSphere Health Check

Every VMware administer should have this beautiful tool - VMware vSphere Health Check!! To set it up, you need to: 1) Install vSphere PowerCLI and PowerGUI, and download the Health Check PowerPack file. 2) Run PowerGUI Admin Console and import the Health Check PowerPack file. 3) Add the target vCenter address then click connect. 4) … Continue reading VMware vSphere Health Check

PowerCLI: Find Orphaned Virtual Machines Location

Very useful PowerCLI script – find the orphaned virtual machines in the VMware cluster. With ‘-delete’ option it will find then delete the orphaned virtual machines. #requires -version 2 function Remove-OrphanedData{<#.SYNOPSIS   Remove orphaned folders and VMDK files.DESCRIPTION   The function searches orphaned folders and VMDK files   on one or more datastores and reports its findings.   Optionally … Continue reading PowerCLI: Find Orphaned Virtual Machines Location

vSphere 5.0 Security Hardening Recommended VM Settings Configure Script

1) Create 3 text files, one for each security profile: profile3_Low.txt RemoteDisplay.maxConnections,2 profile2_Med.txt RemoteDisplay.maxConnections,1floppyX.present,FALSEserialX.present,FALSEparallelX.present,FALSEusb.present,FALSEideX:Y.present,FALSEisolation.tools.unity.push.update.disable,TRUEisolation.tools.ghi.launchmenu.change,TRUEisolation.tools.memSchedFakeSampleStats.disable,TRUEisolation.tools.getCreds.disable,TRUEisolation.tools.autoInstall.disable,TRUEtools.guestlib.enableHostInfo,FALSE profile1_High.txt RemoteDisplay.maxConnections,1floppyX.present,FALSEserialX.present,FALSEparallelX.present,FALSEusb.present,FALSEideX:Y.present,FALSEisolation.tools.unity.push.update.disable,TRUEisolation.tools.ghi.launchmenu.change,TRUEisolation.tools.memSchedFakeSampleStats.disable,TRUEisolation.tools.getCreds.disable,TRUEisolation.tools.autoInstall.disable,TRUEtools.guestlib.enableHostInfo,FALSEisolation.tools.ghi.autologon.disable,TRUEisolation.bios.bbs.disable,TRUEisolation.tools.hgfsServerSet.disable,TRUEisolation.monitor.control.disable,TRUE 2) Create the ‘vSphere_Security_Configure.ps1’ script #Uncomment if this SnapIn has not been added#Add-PSSnapIn VMware.VimAutomation.Core CLS #Specify the VM name here$VM = Get-VM "DEV-LINUX-01" #Specify the security profile file$file = Import-Csv c:\powercli\profile3_Low.txt -Header Key,Value $creds = Get-VICredentialStoreItem -file “C:\powercli\credfile.xml”Connect-viserver -Server … Continue reading vSphere 5.0 Security Hardening Recommended VM Settings Configure Script