This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!!!!....." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |