Virtually everything is poshable
Disclaimer
The opinions expressed on this site are my own and do not reflect the views of my employer, VMware, or any other party unless otherwise stated.RECOMMENDED
vSphere 4.0 Quick Start Guide
Shortcuts down the path of Virtualization
BUY IT NOW:
US $15.99
Europe: £12.53
PDF: £6.26Virtu-Al Lab Config
CPU: 17,592 MHz
RAM: 14,334 MB
Storage: 2,451 GB
ESX Hosts: 2
Resource Pools: 4
Virtual Machines: 16
VMotions: 36
Power States:
(3)
(13)
(0)
last update
0 days, 9 hrs and 20 min.plugin by nickapedia
- 3i (6)
- Blog News (2)
- Book (4)
- certification (1)
- Citrix (4)
- Community (2)
- conference (1)
- EMC (3)
- ESX (32)
- ESX4 (12)
- exchange (4)
- Hyper-V (3)
- Microsoft (7)
- PowerCLI (68)
- PowerGUI (25)
- powershell (177)
- SCVMM (2)
- Training (9)
- twitter (1)
- UK PS User Group (2)
- UKVMUG (6)
- Uncategorized (104)
- VESI (23)
- VI4 (8)
- virtual (6)
- vmware (219)
- VMWorld (8)
- VMWorld Europe 09 (5)
- Windows7 (1)
- August 2010 (2)
- July 2010 (4)
- June 2010 (1)
- May 2010 (4)
- April 2010 (3)
- March 2010 (6)
- February 2010 (11)
- January 2010 (10)
- December 2009 (8)
- November 2009 (15)
- October 2009 (12)
- September 2009 (6)
- August 2009 (9)
- July 2009 (7)
- June 2009 (16)
- May 2009 (11)
- April 2009 (7)
- March 2009 (18)
- February 2009 (9)
- January 2009 (15)
- December 2008 (15)
- November 2008 (19)
- October 2008 (21)
- September 2008 (29)
- August 2008 (24)
- July 2008 (21)
- June 2008 (14)
- May 2008 (10)
- April 2008 (47)
- March 2008 (3)
- PowerCLI: Daily Report (158)
- PowerCLI: Daily Report V2 (120)
- vCheck (Daily Report) V3 (82)
- vCheck v5 (65)
- vDiagram – Draw your VI with one script (37)
- Exporting Virtual Infrastructure Information to MS Word (36)
- Virtual Twits (35)
- Workstation & Server Audit Script V3 (32)
- Running a PowerCLI Scheduled task (25)
- Virtu-Al VESI & PowerGUI PowerPack (22)
Chad King: Coudln't get this to work - is there an update to this script or how should I run this script? I...
Robert Walker: Very nice script. I can see how this will be very useful to us in the future. What are you using...
PowerCLI 4.1 Poster: [...] Fonte: http://www.virtu-al.net/2010/08/25/powercli-4-1-poster-and-quick-reference-guide/ [...]
PowerCLI + VMware vSphere Hardening | Aetmir.com: [...] and it’s wrapped around some functions already written to generate a cleanly formatted...
PowerShell Hacker #13: [...] Renouf wrote a nice PowerShell script, Simple PowerShell selection box, which takes a list of...
Daniel Hong: Great script! I was running into a bit of an issue with Win32_Product class, getting following...
Daniel: Hello Al, i´m a new to powershell and have a simple (or dumb) question: I want to set the ...
VOTE for the Top Free vSphere Tools of 2010: [...] PowerGUI and VMware PowerPacks [...]
My latest tweets
Follow me on Twitter!
- RT @derekscha: "PowerCLI is for Administrators!": Very cool. Won't get to implement half the coolness. #busy --> Thanks ! #VMWorldabout 2 hours ago
- RT @DuncanYB: We just reached our goal!! 12500 labs!!!! #labsrule #vmworld - Amazing stuff, you had better blog the config and details !about 4 hours ago
- Last presentation today, people were waiting at the door at 9:30 and it doesnt start till 10:30 - WOW ! - Looks like about 700 people today.about 4 hours ago
- RT @virtual_geek: @alanrenouf many thanks for creating vCheck v5. It is definetely at top of my powercli scripts list. --> Thanks so much !about 5 hours ago






about 7 months ago
I did try to import you scripts in a Echo Shell. It is imported there and I have vCenter as as managed host. Your powerpack is directly under root. When I try to perform anything I get Dialog box saying that connection is not established and that I should connect to some managed host (which is allready connected). Any answers?
about 7 months ago
Yeah sorry I need to add a further check in there for the version of PowerCLI, you will need to install PowerCLI 4.0 U1 for this to work, please note that PowerCLU 4.0 U1 does not need ESX 4.0 U1 you can use it against previous versions !
Hope this helps.
Alan
about 7 months ago
I was conviced that I allready had CLI U1 installed but I was wrong
. I installed it and it works great. And it’s a great stuff.
Kind regards
5truja
about 7 months ago
Glad it worked out ok
about 4 months ago
Great script Al.
I have code that was added for orphaned vm which was added to version 3. It would be great if you would consider adding to you version stream so I don’t have to update every time you release a new version.
This is from version 3.x
# Orphaned VM’s
$ShowOrphaned = $true
# —- Orphaned VMs’
If ( $showOrphaned ) {
Write-CustomOut “..Checking for Orphaned VMs’”
$myCol = @()
$arrUsedDisks = $fullvmAll | % {$_.Layout} | %{$_.Disk} | % {$_.DiskFile}
foreach ($strDatastore in $Datastores)
{
Write-CustomOut “…searching: $($strDatastore.Name)”
If ( $($strDatastore.Name) -notlike “SOE” ) {
$ds = Get-Datastore -Name $strDatastore.Name | % {Get-View $_.Id}
$fileQueryFlags = New-Object VMware.Vim.FileQueryFlags
$fileQueryFlags.FileSize = $true
$fileQueryFlags.FileType = $true
$fileQueryFlags.Modification = $true
$searchSpec = New-Object VMware.Vim.HostDatastoreBrowserSearchSpec
$searchSpec.details = $fileQueryFlags
$searchSpec.matchPattern = “*.vmdk”
$searchSpec.sortFoldersFirst = $true
$dsBrowser = Get-View $ds.browser
$rootPath = “["+$ds.summary.Name+"]”
$searchResult = $dsBrowser.SearchDatastoreSubFolders($rootPath, $searchSpec)
foreach ($folder in $searchResult)
{
foreach ($fileResult in $folder.File)
{
if ($fileResult.Path)
{
Write-Verbose “….Path: $($folder.FolderPath) $($fileResult.Path)” #Change to verbose
if (-not ($arrUsedDisks -contains ($folder.FolderPath + $fileResult.Path))){
Write-CustomOut “…..Found orphaned VMDK: $($folder.FolderPath) $($fileResult.Path)”
$row = “” | Select DS, Path, File, Size, ModDate
$row.DS = $strDatastore.Name
$row.Path = $folder.FolderPath
$row.File = $fileResult.Path
$row.Size = $fileResult.FileSize
$row.ModDate = $fileResult.Modification
#$row.Host = (Get-View $ds.Host[0].Key).Name
$myCol += $row
}
}
}
}
} else {
Write-CustomOut “….Skipping datatore”
}
}
$myReport += get-sectionheader “orphaned” “Orphaned VMs’ : $($myCol.Count)”
If (($myCol | Measure-Object).count -gt 0) {
$MyReport += InsertCustomTable $myCol
} else {
$myReport += “No Orphaned VM’s”
}
$myReport += get-sectionheaderClose
}
about 2 months ago
You guys are awesome. I have been using your reporting scripts. Keep up the good work.
-Mike
about 1 month ago
Hi, There
your script is great. I have been using it forthe last week.
I would like to make a suggestion. Under the snapshots section I would be nice if we could get the amount in MB of the autual size of the snapshots.
Right now we only get the total amount of disk size
about 1 month ago
Awesome site Al. I have been playing with your scripts and impressed my colleagues with the results. you make me look good
I use your vCheck regularly and was wondering how to add something to it.
I would like to monitor my LUN space. something to tell me how much space I have left per LUN, wich one is over-provisioned…
Thanks
about 1 week ago
Hi Al,
First of all kudos for the excellent job you guys have been doing.
I was trying to use the script “who created the VM” posted by you. Unfortunately, all its shows is CreatedBy “unknown” and CreatedOn “Unknown”. Only a couple of VMs out of the bunch shows the users and the date created.
I must be doing something wrong here.
Any reason as to why the output shows “unknown” or suggestions for the script to produce the desired result.
Appreciate your help in advance.
Regards,
LP
about 6 days ago
Hello Al,
i´m a new to powershell and have a simple (or dumb) question:
I want to set the corestorage claimrule vor my ESXi host to round robin.
In the past i used following command on the ESX SC:
esxcli nmp satp setdefaultpsp –satp VMW_SATP_DEFAULT_AA –VMW_PSP_RR
Can you please tell me how i can manage this for an ESXi host with Powershell?
Thank you and regards
Daniel