your home for end-user virtualization!

PowerCLI

Using PowerCLI to remotely execute esxcli commands

First, make sure you’re using a version of PowerCLI that supports the get-esxcli cmdlet. In this case, I used a fresh install of PowerCLI 5.5. First, get-esxcli needs to be run against a single host individually, you can loop through you’re hosts later, but again, one at a time. So I did: $getcli = Get-EsxCli […]

Tags: ,

Posted in esxcli, PowerCLI, Powershell, vmware | 1 Comment »

Finding orphaned VMDK’s using PowerCLI

Here is a PowerCLI script I use to find all orphaned VMDK’s in my vCenter environment. $arrayVC = “virtualcenter2” Foreach ($strVC in $arrayVC) { Connect-VIServer $strVC $arrUsedDisks = Get-VM | Get-HardDisk | %{$_.filename} $arrUsedDisks += get-template | Get-HardDisk | %{$_.filename} $arrDS = Get-Datastore Foreach ($strDatastore in $arrDS) { $strDatastoreName = $strDatastore.name $ds = Get-Datastore -Name […]

Tags: , ,

Posted in PowerCLI, Powershell, Virtualization, vmware | No Comments »

Automating the Cisco UCS build using Cisco PowerTool

After installing Cisco UCS and performing the initial setup of the UCS Fabric Interconnects; there is a lot of work that needs to be completed prior to configuring the blade Service Profiles. This can be done a multitude of ways, manually through UCSM, scripted through SSH or now through PowerShell using Cisco PowerTool. This allows […]

Tags: , , , , , , , , ,

Posted in Cisco, Cisco UCS, Cloud, Powershell, PowerTool, Virtualization | 3 Comments »

Configure Syslog on ESXi using PowerShell and PowerCLI

Using powershell, I was able to configure all the hosts in my vCenter instance First, I needed to configure the syslog host get-vmhost| Set-VMHostAdvancedConfiguration -NameValue @{‘Config.HostAgent.log.level’=’info’;’Vpx.Vpxa.config.log.level’=’info’;’Syslog.global.logHost’=’udp://IPADDDR:514′} I then needed to open the appropriate firewall ports for the traffic to get through get-vmhost| Get-VMHostFirewallException |?{$_.Name -eq ‘syslog’} | Set-VMHostFirewallException -Enabled:$true On the C220 M3’s, we had […]

Tags: , , ,

Posted in PowerCLI, Powershell, vmware | 1 Comment »

Search

Categories