Skip to content

Instantly share code, notes, and snippets.

WRITE-HOST "!!!RESCATANDO LOS VMK!!!"
$VMKid=READ-HOST "Ingresar el nombre del VMKERNEL - Input the VMKERNEL Name"
$Destination=READ-HOST "A que VSWITCH desea mover el VMK?? - What VSWITCH wants to move the VMK?"
$vmk=get-vmhost | get-vmhostnetworkadapter -name $vmkid
$ip=$vmk.ip
$mask=$vmk.subnetmask
$mtu=$vmk.mtu
$porgroupname=$vmk.PortGroupName
$mgmtstate=$vmk.ManagementTrafficEnabled
Write-Host " BUSCADOR DE MacAddress " -foregroundcolor "black" -backgroundcolor "green"
$macaddress= Read-Host "INGRESAR LA MacAddress, CON EL SIGUIENTE FORMATO EJ: 00:50:56:a3:11:c5"
foreach ($vm in get-vm )
{
$mac= get-networkadapter -vm $vm | select macaddress
if($mac.MacAddress -eq $macaddress)
{
Write-Host " SERVIDOR <"$vm"> " -foregroundcolor "black" -backgroundcolor "YELLOW"
WRITE-HOST "INGRESAR CREDENCIALES DE LOGON @pablitocli"
$cred=get-credential
WRITE-HOST "REALIZANDO CONEXION A LOS VCENTERS!!!!"
$vc1=read-host "INGRESE EL vCenter ORIGEN"
$vc2=read-host "INGRESE EL vCenter Destino"
WRITE-HOST "CONNECTANDO!!!!....."
#add-pssnapin VMware.VimAutomation.Core
#Requires -Version 2.0
Set-StrictMode -Version Latest
#Push-Location $(Split-Path $Script:MyInvocation.MyCommand.Path)
#. .\include\Export-HtmlReport.ps1
#Requires -Version 2.0
Set-StrictMode -Version Latest
@pablitocli
pablitocli / inventario-full.ps1
Created March 27, 2018 14:58
inventario-full
#add-pssnapin VMware.VimAutomation.Core
#Requires -Version 2.0
Set-StrictMode -Version Latest
Push-Location $(Split-Path $Script:MyInvocation.MyCommand.Path)
. .\include\Export-HtmlReport.ps1
##CONEXION VCENTER SERVER
#$vcenter= read-host "vCenter Server Name"
#$cred= get-credential