I hereby claim:
- I am lamw on github.
- I am lamw (https://keybase.io/lamw) on keybase.
- I have a public key whose fingerprint is E88C 6F19 C677 D636 B010 D47B 5106 881E 8111 94BD
To claim this, I am signing this object:
####### PS Script (test2.ps1) | |
if ( !(Get-Module -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) ) { | |
. "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1" | |
} | |
$vcserver = "172.30.0.112" | |
$vcusername = "administrator@vghetto.local" | |
$vcpassword = "VMware1!" |
$esxiserver = "192.168.1.200" | |
$esxiusername = "root" | |
$esxipassword = "vmware123" | |
Connect-VIServer -Server $esxiserver -User $esxiusername -Password $esxipassword -WarningAction SilentlyContinue | |
$vihost = Get-View -Server $esxiserver -ViewType HostSystem -Property Name, Summary | |
Write-host "`nESXi Host: " $vihost.Name | |
Write-Host "vCenter Server: " $vihost.Summary.ManagementServerIp |
$clusterName = "VSAN-Cluster" | |
$cluster = Get-Cluster -Name $clusterName | |
$vms = Get-View ($cluster| Get-VM) | |
$cluster_view = Get-View ($cluster) | |
foreach ($vm in $vms) { | |
# Using new vSphere 6.0 API (http://www.virtuallyghetto.com/2015/02/handy-new-vsphere-6-0-apis-to-be-aware-of.html) | |
$cluster_view.FindRulesForVm($vm.MoRef) | |
} |
I hereby claim:
To claim this, I am signing this object:
##### *Nix using openssl (http://www.virtuallyghetto.com/2012/04/extracting-ssl-thumbprint-from-esxi.html) | |
echo -n | openssl s_client -connect 192.168.1.200:443 2>/dev/null | openssl x509 -noout -fingerprint -sha1 | |
SHA1 Fingerprint=AF:3F:70:E6:78:50:41:76:F0:E0:55:78:C0:77:49:FB:69:36:93:6C | |
##### Windows using PowerShell Option #1 (https://communities.vmware.com/thread/501913?start=0&tstart=0) | |
Function Test-WebServerSSL { | |
# Function original location: http://en-us.sysadmins.lv/Lists/Posts/Post.aspx?List=332991f0-bfed-4143-9eea-f521167d287c&ID=60 |
$esxcli = Get-EsxCli | |
### To retrieve Major/Update version number of ESXi via ESXCLI | |
PS C:\Users\lamw\Desktop> $esxcli.system.version.get().version + " Update" + $esxcli.system.version.get().update | |
6.0.0 Update1 | |
### To retrieve all version information from ESXi via ESXCLI | |
PS C:\Users\lamw\Desktop> $esxcli.system.version.get() |
{ | |
"Deployment": "tiny", | |
"DiskProvisioning": "thin", | |
"IPAllocationPolicy": "dhcpPolicy", | |
"IPProtocol": "IPv4", | |
"InjectOvfEnv": true, | |
"Name": "VCSA-60u2-Embedded", | |
"PowerOn": true, | |
"PropertyMapping": [ | |
{ |
Function Get-SSLThumbprint { | |
param( | |
[Parameter( | |
Position=0, | |
Mandatory=$true, | |
ValueFromPipeline=$true, | |
ValueFromPipelineByPropertyName=$true) | |
] | |
[Alias('FullName')] | |
[String]$URL |
Connect-VIServer -Server 192.168.1.51 -User administrator@vghetto.local -password VMware1! | Out-Null | |
$vmhosts = Get-VMHost | |
foreach ($vmhost in $vmhosts) { | |
$vmhostName = $vmhost.Name | |
$vmhostServiceTag = "N/A" | |
$otherInfos = $vmhost.ExtensionData.Hardware.SystemInfo.OtherIdentifyingInfo | |
foreach ($info in $otherInfos) { |
FROM photon | |
RUN tdnf -y install tar gzip sed gawk ncurses-compat | |
ADD VMware-ovftool-4.2.0-4586971-lin.x86_64.bundle /tmp/ | |
RUN chmod +x /tmp/VMware-ovftool-4.2.0-4586971-lin.x86_64.bundle | |
RUN echo -e "/w00t\n" >> /tmp/answer | |
RUN /tmp/VMware-ovftool-4.2.0-4586971-lin.x86_64.bundle --eulas-agreed --required --console < /tmp/answer |