Memory Ballons

$myCol = @()
foreach($vm in (Get-View -ViewType VirtualMachine | Where-Object `
{$_.Summary.QuickStats.BalloonedMemory -ne "0"})){
$Details = "" | Select-Object VM, `
SwappedMemory ,BalloonedMemory

$Details.VM = $vm.Name
$Details.SwappedMemory = $vm.Summary.QuickStats.SwappedMemory
$Details.BalloonedMemory = $vm.Summary.QuickStats.BalloonedMemory

$myCol += $Details
}
$myCol

[powershell]
$myCol = @()
foreach($vm in (Get-View -ViewType VirtualMachine | Where-Object `
{$_.Summary.QuickStats.BalloonedMemory -ne "0"})){
$Details = "" | Select-Object VM, `
SwappedMemory ,BalloonedMemory

$Details.VM = $vm.Name
$Details.SwappedMemory = $vm.Summary.QuickStats.SwappedMemory
$Details.BalloonedMemory = $vm.Summary.QuickStats.BalloonedMemory

$myCol += $Details
}
$myCol
[/powershell]

find stupid 100 meg links

Get-VMHost | Get-VMHostNetworkAdapter | where {$_.BitRatePerSec -eq "100"} | fl VMhost,BitRatePerSec,DeviceName

[powershell]
Get-VMHost | Get-VMHostNetworkAdapter | where {$_.BitRatePerSec -eq "100"} | fl VMhost,BitRatePerSec,DeviceName
[/powershell]

Intra-Organization SMTP Send Connector

setspn -a SMTPSVC/email.xyz.com XYZExchange01

exchange 2010 kerb errors going to 2003 bombing.

Exchange 2010 sp1

http://technet.microsoft.com/en-us/library/bb691354.aspx

Copy vSwitches and Portgroups to everybody in a cluster (like a boss)

Does just what it says, set up one host, and copys everything to the rest of the host, helps me set stuff up faster 🙂

#alan harrington, copy networking one host to another.
Connect-VIServer vcenter.alanrocks.com
$src = Read-Host "Please enter the golden host for networking: "
$destclu = Read-Host "Please enter the name of the cluster to copy too: "
foreach ($dest in (get-cluster $destclu | Get-VMHost)){

$desthost = Get-VMhost $dest
get-vmhost $src | Get-VirtualPortGroup | select VirtualSwitchName,Name,VLanId | export-csv c:\hostnetworking.txt -NoTypeInformation
$infohizzle = import-csv c:\hostnetworking.txt | where-object {$_.name -notmatch "vmotion" -and $_.name -notmatch "VMkernel" -and $_.name -notmatch "Service" -and $_.name -notmatch "Management Network"}

$infohizzle | % {
$Vportgrp = $_.Name
$vswitch = $_.VirtualSwitchName
$vlan = $_.VlanId

If (($desthost |Get-Virtualportgroup -Name $Vportgrp -ErrorAction SilentlyContinue)-eq $null){
if (($desthost |Get-VirtualSwitch -Name $vswitch -ErrorAction SilentlyContinue)-eq $null){$desthost | New-VirtualSwitch -Name $vswitch}
$desthost | Get-VirtualSwitch -Name $vswitch | New-VirtualPortGroup -ErrorAction "SilentlyContinue" -Name $Vportgrp -VLanId $vlan}}}

Stupid board - zfs could be faster

pci, instance #0
pci1028,20e (driver not attached)
isa, instance #0
motherboard (driver not attached)
pit_beep, instance #0
pci1028,20e (driver not attached)
pci1028,20e (driver not attached)
pci1028,20e, instance #0
keyboard, instance #0
mouse, instance #1
pci1028,20e, instance #0
pci10de,3f3, instance #0
pci-ide, instance #0
ide (driver not attached)
ide (driver not attached)
pci-ide, instance #1
ide, instance #2
cmdk, instance #2
ide, instance #3
cmdk, instance #3
pci-ide, instance #2
ide, instance #4
cmdk, instance #0
ide, instance #5
cmdk, instance #1
pci10de,3e8, instance #0
pci1166,103, instance #2
pci14e4,164c, instance #0
pci10de,3e9 (driver not attached)

nice, i've been running in ide mode this whole time, no ncq without sata. fuckers.

WordPress Themes