PowerCLI 5.0.1 – vCloud Director Automation

Posted Posted in Information Technology, Virtualization

Via Alan Renouf – PowerShell PowerCLI v 5.0.1 includes support for vCloud Director Automation cmdlets. Normally with a .0.1 release you will see small bug fixes and performance increases. This is the case with this release, there are indeed bug fixes and performance increases but there is also something very exciting… PowerShell Cmdlets for managing VMware’s cloud solution – VMware vCloud Director. The latest bug fixes and other enhancements can be found in the change log here, this post will mainly cover what’s new from the vCD PowerCLI snapin or VMware.VimAutomation.Cloud snapin. (read more and see the list of cmdlets)

Creating an Excel Pivot Table Using PowerShell

Posted Posted in Development, Information Technology

Doug Finke has a new post about a PowerShell script he wrote to create an Excel Pivot Table. Out-ExcelPivotTable inspects the piped data, sets up the numeric properties as data fields and string properties as row fields (nested). Doug includes screenshot of the output, in case you are unfamiliar with Pivot Tables. The actual script he built can bedownloaded here. Sample Usage: Function New-Person ($dept, $name, [double]$salary, [int]$yearsEmployeed) { New-Object PSObject | Add-Member -PassThru Noteproperty Dept $dept | Add-Member -PassThru Noteproperty Name $name | Add-Member -PassThru Noteproperty Salary $salary | Add-Member -PassThru Noteproperty YearsEmployeed $yearsEmployeed } $( New-Person IT Doug […]

PowerShell and SQL Server

Posted Posted in Information Technology

Customers are always asking about using PowerShell to interact with their SQL servers.  One great source I’ve started following is Max Trinidad.  He has a very good grasp of both PowerShell and SQL Server administration.  Max has also contributed to codeplex with the SQLDevTools Module.  He wrote a blog postthat discusses some of the features. Here’s one of the function that’s part of my recentSQLDevTools Module – “Get-TSQLTableRecordCount” which is a good example of a multi-purpose command.   The main purpose of this function is to assist in displaying the record count of all tables in the database.  But, at the same time […]

Count Running Virtual Machines on Datastores

Posted Posted in Development, Information Technology, Virtualization

Found another good candidate for a PowerVI script atvNiklas.djungel.se. If you are running too many VM´s on your datastores in your vSphere environment you can have some problems, this if your SAN is not VAAI compliant and can handle SCSI locking etc. Alan Renouf has made a blog post about how to get a report about how many VM´s you have on every datastore, I have extended to only report on running VM´s as these are the interesting number.. (read more) I would alter his script slightly for use in PowerVI. #–name Virtual Machines Per Datastore #–multi –hideoutput #–origin PowerSE […]

Enabling and Disabling Hyper-Threading via PowerCLI

Posted Posted in Information Technology, Virtualization

I found an interesting discussion on the VMware Communities about managing hyper-threading settings via PowerCLI.  The discussion has a couple of useful scripts.  To find out if hyper-threading is enabled use this script: Get-Host | Select-Object Name,HyperthreadingActive To disable hyper-threading, use the connect-VIserver to connect directly to the host and use this script: ## host upon which to act $strMyHostName = “myhost.domain.com” ## get the View object for the HostCpuSchedulerSystem $viewHostCPUSchedulerSystem = Get-View (Get-View -ViewType HostSystem -Property ConfigManager.CpuScheduler -Filter @{“Name” = $strMyHostName}).ConfigManager.CpuScheduler ## disable hyperthreading $viewHostCPUSchedulerSystem.DisableHyperThreading() Note: DisableHyperThreading method is available in vSphere 4.1 and later.