lunes, 13 de septiembre de 2010

Self Service Portal 2.0 de System Center Virtual Machine Manager 2008 R2

 

Hace unos escasos días se ha publicado una nueva Release del portal de Autoservicio de SCVMM 2008 R2.

Como sé que os interesa saber cuáles son las diferencias del portal anterior y queréis descargároslo, os dejo el enalce para descargar el producto y toda la documentación.

http://www.microsoft.com/downloads/details.aspx?FamilyID=fef38539-ae5a-462b-b1c9-9a02238bb8a7&displaylang=en

Las nuevas funciones son:

· Use standardized forms to request new infrastructures or changes to infrastructure components. Each business unit can submit requests to the datacenter administrator. The standardized forms ensure that the datacenter administrator has all of the information needed to fulfill the requests without needing to repeatedly contact the business unit for details.

· Create and manage their own virtual machines. The VMMSSP website includes self-service provisioning forms that business units can use to create virtual machines. When a business unit submits a request to create virtual machines, the self-service portal starts an automated provisioning process creates the virtual machines more quickly and efficiently than a manual process.

· Delegate the details of virtual machine management. Each business unit can designate its own administrators, advanced operators, and users.

Datacenter administrators can use the self-service portal to do the following:

· Extend the default virtual machine actions to fit your datacenter. You can work with technology partners and hardware vendors to modify the standard “actions” that the self-service portal uses to create and manage virtual machines. In this way, you can extend the self-service portal to use specific storage area networks (SANs), load balancers, and so forth.

· Simplify the process of enrolling business units and defining their needs. The self-service portal collects information about a business unit and about the resources they want to set up.

· Simplify the process of validating and provisioning resources for business units. Datacenter administrators can use the self-service portal to assign resources based on business unit requests.

· Control the change process for these resources. Changes to resources follow a request-and-approve life cycle, and the requests remain on record in the database.

 

Personalmente os comento, que se agradece la nueva granularidad a la hora de dar permisos.

Un saludo, Samuel.

miércoles, 25 de agosto de 2010

Service Pack 1 para Exchange Server 2010

Buenas.

El equipo de producto de Microsoft nos felicita las fiestas del verano con un rejuvenecido SP1 para nuestro Exchange 2010.

Descarga:
http://www.microsoft.com/downloads/details.aspx?FamilyID=50b32685-4356-49cc-8b37-d9c9d4ea3f5b&displaylang=en

En estre otro enlace podremos ver las novedades incluidas:

http://technet.microsoft.com/en-us/library/ff459257%28EXCHG.141%29.aspx

Un saludo, Samuel.

martes, 10 de agosto de 2010

Ebooks técnicos gratis para que los descargues

Buenos días.

Como sé que te gusta “lo gratis”, aquí te paso una lista de libros electrónicos gratuitos de Microsoft Press.

  • Understanding Microsoft Virtualization Solutions – 2da edición (Desde el escritorio al DataCenter)
  • Introducing Microsoft SQL Server 2008 R2
  • First look Microsoft Office 2010
  • Windows 7 troubleshooting tips

    Que los disfrutes, un saludo, Samuel.

  • viernes, 6 de agosto de 2010

    jueves, 5 de agosto de 2010

    Health Check Completo para Entorno VMWare con PowerShell y Powercli

    Hola, después de unos días de vacaciones muy tranquilos con mis ángeles, volvemos a la carga.

    Hace unas semanas os comenté que estaba trabajando en scripting para obtener informes programados sobre un DataCenter VMware de máquinas virtuales en un cliente donde voy a estar durante un largo tiempo.El cliente no cuenta con informes parecidos y de forma “proactiva” me puse manos a la obra. La idea de este script es ejecutarse de manera automática y programada para que genere y envíe por correo a una cuenta de correo específica el fichero output. Para la ejecución y programación de los scripts no he querido utilizar los servidores Virtual Center del cliente y han sido programados desde otro servidor que el cliente tiene para tests tales como ExRaps,Adraps,ClusterRaps,etc,etc. Así que esa máquina para mi era perfecta para la azaña.

    Como veréis más adelante los cmdlets utilizados son un “híbrido” entre Powershell nativo y nuevos cmdlets de “powercli”.(En líneas posteriores de este artículo tenéis enlaces a documentación y descarga de Powercli).

    Primero os detallo un pequeño procedimiento de configuración del script para que tengáis claro qué valores deberéis modificar para vuestra plataforma.

    Que lo disfrutéis.

     

    Procedimiento de configuración del script

    #   Editamos el fichero powershell.ps1 y se editan las siguientes variables:
    #   $vcserver="localhost"
    #   Se introducirá el nombre del Virtual Center al que nos conectaremos.
    #   Si el script se ejecuta desde un VC se # tipeará "localhost"
    #   $portvc="443"
    #   Se edita el puerto. Por defecto es el 443
    #   $filelocation="c:\healthcheck.htm"
    #   Se especifica en $filelocation la ruta donde se desea guardar el report
    #   $enablemail="yes"
    #   Habilitado (yes) o deshabilitado (no) para enviar el report por mail
    #   $smtpServer = "mail.samuelgarciacalventehealthcheck.org"
    #   Se especificará el servidor smtp desde el cual se hará el envío del Report
    #   $mailfrom = "Health Check del Virtual Center XX <powershellAVA@healthcheck.ava>"
    #   Se especifica la cuenta desde donde se envía y el “Display Name que queremos mostrar”
    #   $mailto = "users@healtcheck.ava"
    #   Se especifica la cuenta de recepción#

     

    Requerimientos para ejecutar el script:


    Para el lanzamiento de dicho script necesitaremos de los siguientes requisitos mínimos:

    1. Máquina Windows XP SP3 o superior con acceso por el puerto establecido al Virtual Center (por defecto el 443). Si la máquina está en dominio ayudará.
    2. Powershell 1.0 (Descarga 1.0)
    3. Powercli
    4. Cuenta de administrador local en la máquian donde se lance los scripts y se dejen las tareas programadas.
    5. Usuario con credenciales en VMware.

      (En mi caso se me dio de alta como Administrador en los dos Virtual Center del cliente. En caso de que vuestra infraestructura cuente con VC, la ejecución de los scripts será mucho más cómoda. En caso de que solo haya ESX, habrá que ejecutar un script para cada ESX, por lo que tendremos tantos reports como ESX haya en la infraestructura.

     

    Script completo


    # Este script chequea el estado de un entorno de VMWARE en los siguientes puntos:   
    #    
    # PROCEDIMIENTO PARA LA MODIFICACIÓN DEL SCRIPT
    #   Editamos el fichero powershell.ps1 y se editan las siguientes variables:
    #   $vcserver="localhost"
    #   Se introducirá el nombre del Virtual Center al que nos conectaremos.
    #   Si el script se ejecuta desde un VC se # tipeará "localhost"
    #   $portvc="443"
    #   Se edita el puerto. Por defecto es el 443
    #   $filelocation="c:\healthcheck.htm"
    #   Se especifica en $filelocation la ruta donde se desea guardar el report
    #   $enablemail="yes"
    #   Habilitado (yes) o deshabilitado (no) para enviar el report por mail
    #   $smtpServer = "mail.samuelgarciacalventehealthcheck.org"
    #   Se especificará el servidor smtp desde el cual se hará el envío del Report
    #   $mailfrom = "Health Check del Virtual Center XX <powershellAVA@healthcheck.ava>"
    #   Se especifica la cuenta desde donde se envía y el “Display Name que queremos mostrar”
    #   $mailto = "users@healtcheck.ava"
    #   Se especifica la cuenta de recepción#


    #
    ###########################################################################################
    #                   
    ###########################################################################################
    #  Procedimiento de Configuración del Script
    #
    #   Editamos el fichero powershell.ps1 y se editan las siguientes variables:
    #   $vcserver="localhost"
    #   Se introducirá el nombre del Virtual Center al que nos conectaremos. Si el script se ejecuta desde un VC se tiepará "localhost"
    #   $portvc="443"
    #   Se edita el puerto. Por defecto es el 443
    #   $filelocation="c:\healthcheck.htm"
    #   Se especifica en $filelocation la ruta donde se desa guardar el report
    #   $enablemail="yes"
    #   Habilitado (yes) o deshabilitado (no) para enviar el report por mail
    #   $smtpServer = "mail.healthcheck.org"
    #   Se especificará el servidor smtp desde el cual se hará el envío del Report
    #   $mailfrom = "Health Check del Virtual Center XX <powershellAVA@healthcheck.ava>"
    #   Se especifica la cuetna desde donde se envía.
    #   $mailto = "users@healtcheck.ava"
    #   Se especifica la cuenta de recepción#
    #

    ###########################################################################################
    # Utilización:
    #
    #   Ejecutar manualmente el script en .ps1
    #
    #   1. Abrir Powershell con el snapin de Powercli
    #   2. Navegar hasta el directorio donde resida el script .ps1
    #   3. Ejecutar el comando:
    #   ./script.ps1
    #
    # 
    ###########################################################################################

    ###############################################
    # Nombre de servidor de VMware VirtualCenter  #
    ###############################################

    $vcserver="VIRTUALSERVERNAME Ó HOSTNAME"
    $portvc="443"

    ################################
    # Añadir Snapin de  VI-toolkit #
    ################################
    Add-PSsnapin VMware.VimAutomation.Core
    # SGC. Eliminado puesto que Powercli será un requisito y no se desea su comprobación. Desrenombrar en caso de que se desee comprobar el estado del snapin##
    # Se arranca VI Toolkit y se realiza conexión contra el virtual center desde el puerto definido
    Initialize-VIToolkitEnvironment.ps1
    connect-VIServer $vcserver -port $portvc

    #############
    # Variables #
    #############

    #$date=get-date -format g
    $date=get-date -displayhint date
    #SGC modificado la toma de datos de fecha para Castellano.Si se desea en americano eliminar "-displayhint date"
    $filelocation="C:\scripts\healthcheck_VIRTUALSERVER.HTM"
    $vcversion = get-view serviceinstance
    $snap = get-vm | get-snapshot
    $ErrorActionPreference = "SilentlyContinue"
    #######################
    # Variables de Correo #
    #######################

    $enablemail="yes"
    $smtpServer = "mail.healthcheck.org"
    $mailfrom = "Estado de Salud del Entorno VMWARE de …<administracion@healthcheck.org>"
    $mailto = "users@healtcheck.ava"

    #######################################
    # Conversión a HTML y hoja de estilos #
    #######################################
    #ConvertTo-Html –title "VMware Health Check " –body "<H1>VMware Health script</H1>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File $filelocation

    ConvertTo-Html –title "VMware Health Check " –body "<style>body { background-color:#F9F9F9; } body,table,td,th { font-family:Calibri; color:Black; Font-Size:12pt } th { font-weight:bold; background-color:#81BEF7; } td { background-color:white; } </style><H1>VMware Health Script (Hosts de UBICACIÓN X)</H1>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File $filelocation
    ConvertTo-Html –title "VMware Health Check " –body "<H4>Fecha y hora</H4>",$date -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation
    # código de colores: http://html-color-codes.info/codigos-de-colores-hexadecimales/

    #body { background-color: #F2F2F2; }  gris de fondo
    #body,table,td,th { font-family:Calibri; color:Black; Font-Size:10pt } tipo de letra negro
    #th { font-weight:bold; background-color:#CCCCCC; } gris más oscuro de las tablas
    #td { background-color:white; } color de fondo de las tablas

    ############################
    # Hardware de VMware ESX   #
    ############################
    Get-VMHost | Get-View | ForEach-Object { $_.Summary.Hardware } | Select-object Vendor, Model, MemorySize, CpuModel, CpuMhz, NumCpuPkgs, NumCpuCores, NumCpuThreads, NumNics, NumHBAs | ConvertTo-Html –title "Configuración Hardware de los servidores ESX" –body "<H2>Configuración Hardware de los servidores ESX.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    ##########################################
    # Versión de Virtual Center de VMware    #
    ##########################################
    $vcversion.content.about | select Version, Build, FullName | ConvertTo-Html –title "Versión VMware de vCenter" –body "<H2>Versión VMware de vCenter.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" |Out-File -Append $filelocation

    ###################################
    # Información de Cluster VMware #
    ###################################
    $clusters = Get-Cluster | Sort Name

    ForEach ($cluster in $clusters)
    {
        $vmhosts = Get-VMHost -Location $cluster
        ForEach ($VMhostView in ($vmhosts | Get-View))
        {
            $TotalHostMemory += $vmhostView.Hardware.MemorySize
        }
        #$vmhosts | Sort Name -Descending | % { $server = $_ |get-view; $server.Config.Product | select { $server.name }, Version, Build, FullName }| ConvertTo-Html –body "<H2>$cluster Información del Clúster .</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation
    #    $vmhosts | Sort Name -Descending | % { $server = $_ |get-view; $server.Config.Product | select { $server.name }, Version, Build, FullName }| ConvertTo-Html –body "<H2>$cluster Información del Clúster .</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation
        #$vmhosts | Sort name -Descending | % { $server = $_ |get-view; $server.Config.Product | select { $server.name }, Version, Build, FullName }| ConvertTo-Html –body "<H2>$cluster Cluster Information.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation
        $vmhosts | Sort Name -Descending | % { $server = $_ |get-view; $server.Config.Product | select {$server.Name}, Version, Build, FullName }| ConvertTo-Html –body "<H2>$cluster Cluster Information.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

        $NumHosts = ($vmhosts | Measure-Object).Count
        $vms = Get-VM -Location $cluster | Where {$_.PowerState -eq "Powered On"}
        $NumVMs = $vms.Length
        $TotalRAM_GB = [math]::Round($TotalHostMemory/1GB,$digits)
        $TotalVMMemoryMB = $vms | Measure-Object -Property MemoryMB -Sum
        $AssignedRAM_GB = [math]::Round($TotalVMMemoryMB.Sum/1024,$digits)
        $PercentageUsed = [math]::Round((($TotalVMMemoryMB.Sum/1024)/($TotalHostMemory/1GB))*100)       
        ConvertTo-Html –body " $NumHosts host(s) ejecutando $NumVMs Máquinas Virtuales" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation
        ConvertTo-Html –body "Total de Recursos de Memoria = $TotalRAM_GB GB"  | Out-File -Append $filelocation
        ConvertTo-Html –body "Cantidad Total de Memoria Asignada = $AssignedRAM_GB GB"  | Out-File -Append $filelocation
        ConvertTo-Html –body "Porcentaje de Recursos de Memoria Asignada = $PercentageUsed %"  | Out-File -Append $filelocation
        Clear-Variable vmhosts -ErrorAction SilentlyContinue
        Clear-Variable vms -ErrorAction SilentlyContinue
        Clear-Variable NumVMs -ErrorAction SilentlyContinue
        Clear-Variable TotalHostMemory -ErrorAction SilentlyContinue
        Clear-Variable TotalVMMemoryMB -ErrorAction SilentlyContinue
    }

    #######################
    #    Estadísticas     #
    #######################
    ConvertTo-Html –title "Estadísticas VMware" –body "<H2>Estadísticas VMware</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -append $filelocation
    Get-VMHost | Measure-Object | Select Count | ConvertTo-Html –title "Número de Hosts VMware" –body "<H4>Número de Hosts VMware.</H4>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation
    Get-VM | Measure-Object | Select Count | ConvertTo-Html –title "Número Total de Máquinas Virtuales" –body "<H4>Número Total de Máquinas Virtuales.</H4>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation
    Get-Cluster | Measure-Object | Select Count | ConvertTo-Html –title "Número de Clusters VMware" –body "<H4>Número de Clusters VMware.</H4>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation
    Get-Datastore | Measure-Object | Select Count | ConvertTo-Html –title "Número de Datastores" –body "<H4>Número de Datastores.</H4>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    #############
    # Snapshots #
    #############
    $snap | select vm, name,created,description | ConvertTo-Html –title "Snaphots Activos" –body "<H2>Snaphots Activos.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />"| Out-File -Append $filelocation

    #################################
    # VMware CDROM conectado a VM´s #
    #################################
    Get-vm | where { $_ | get-cddrive | where { $_.ConnectionState.Connected -eq "true" } } | Select Name | ConvertTo-Html –title "CDROMs conectados" –body "<H2>CDROMs conectados.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />"|Out-File -Append $filelocation

    #########################################
    # VMware floppy conectado a VM´s        #
    #########################################
    Get-vm | where { $_ | get-floppydrive | where { $_.ConnectionState.Connected -eq "true" } } | select Name |ConvertTo-Html –title "Floppy drives conectados" –body "<H2>Floppy drives conectados.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" |Out-File -Append $filelocation

    ##############################
    # Información del Datastore  #
    ##############################

    function UsedSpace
    {
        param($ds)
        [math]::Round(($ds.CapacityMB - $ds.FreeSpaceMB)/1024,2)
    }

    function FreeSpace
    {
        param($ds)
        [math]::Round($ds.FreeSpaceMB/1024,2)
    }

    function PercFree
    {
        param($ds)
        [math]::Round((100 * $ds.FreeSpaceMB / $ds.CapacityMB),0)
    }

    $Datastores = Get-Datastore
    $myCol = @()
    ForEach ($Datastore in $Datastores)
    {
        $myObj = "" | Select-Object Datastore, UsedGB, FreeGB, PercFree
        $myObj.Datastore = $Datastore.Name
        $myObj.UsedGB = UsedSpace $Datastore
        $myObj.FreeGB = FreeSpace $Datastore
        $myObj.PercFree = PercFree $Datastore
        $myCol += $myObj
    }
    $myCol | Sort-Object PercFree | ConvertTo-Html –title "Espacio Disponible del DataStore" –body "<H2>Espacio Disponible del DataStore</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    # Invoke-Item $filelocation

    #############################################################################
    # Obtiene los datos de todos los DataStores y se colocan en Orden Alfabético#
    #############################################################################
    function Get-DSDevice($dsImpl)
    {
            $ds = Get-View -Id $dsImpl.Id
            $esx = Get-View $ds.Host[0].Key
            $hss = Get-View $esx.ConfigManager.StorageSystem

            foreach($mount in $hss.FileSystemVolumeInfo.MountInfo){
                if($mount.volume.name -eq $ds.Info.Name){
                switch($mount.Volume.Type){
                "VMFS" {
                    foreach($ext in $mount.Volume.Extent){
                        if($mount.volume.name -eq $ds.Info.Name){
                            $device =$ext.DiskName
                        }
                    }
                  }
                "NFS" {
                    $device = $mount.Volume.RemoteHost + ":" + $mount.Volume.RemotePath
                  }
                }
              }
            }
        $device
    }

    $datastores = get-vmhost  | Get-Datastore | Sort-Object Name
    $myColCurrent = @()

    foreach ($store in $datastores){
        $myObj = "" | Select-Object Name, CapacityGB, UsedGB, PercFree, Type, ID, Accessible
        $myObj.Name = $store.Name
        $myObj.CapacityGB = "{0:n2}" -f ($store.capacityMB/1kb)
        $myObj.UsedGB = "{0:N2}" -f (($store.CapacityMB - $store.FreeSpaceMB)/1kb)
        $myObj.PercFree = "{0:N}" -f (100 * $store.FreeSpaceMB/$store.CapacityMB)
        $myObj.Type = $store.Type
        $temp = Get-View -Id $store.Id
        $myObj.ID = Get-DSDevice $store
        $myObj.Accessible = $store.Accessible
        $myColCurrent += $myObj
    }

    # Exporta al HTML
    $myColCurrent | ConvertTo-Html –title "Información del Datastore" –body "<H2>Información del Datastore.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    ############################
    #    Información de RDM    #
    ############################
    $report = @()
    $vms = Get-VM  | Get-View
    foreach($vm in $vms){
      foreach($dev in $vm.Config.Hardware.Device){
        if(($dev.gettype()).Name -eq "VirtualDisk"){
          if(($dev.Backing.CompatibilityMode -eq "physicalMode") -or
             ($dev.Backing.CompatibilityMode -eq "virtualMode")){
            $row = "" | select VMName, HDDeviceName, HDFileName, HDMode, HDsize
              $row.VMName = $vm.Name
            $row.HDDeviceName = $dev.Backing.DeviceName
            $row.HDFileName = $dev.Backing.FileName
            $row.HDMode = $dev.Backing.CompatibilityMode
               $row.HDSize = $dev.CapacityInKB
            $report += $row
          }
        }
      }
    }

    $report | ConvertTo-Html –title "Información de RDM" –body "<H2>Información de RDM.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    #####################################
    #   Estadísticas de todas las VM    #
    #####################################

    $Report = @()
    get-vm | Sort Name -Descending | % {
      $vm = Get-View $_.ID
        $vms = "" | Select-Object VMName, Hostname, IPAddress, VMState, TotalCPU, TotalMemory, TotalNics, OverallCpuUsage, MemoryUsage, ToolsStatus, ToolsVersion, MemoryLimit, MemoryReservation, CPUreservation, CPUlimit , "HW Version"
        $vms.VMName = $vm.Name
        $vms.Hostname = $vm.guest.hostname
        $vms.IPAddress = $vm.guest.ipAddress
        $vms.VMState = $vm.summary.runtime.powerState
        $vms.TotalCPU = $vm.summary.config.numcpu
        $vms.TotalMemory = $vm.summary.config.memorysizemb
        $vms.TotalNics = $vm.summary.config.numEthernetCards
        $vms.OverallCpuUsage = $vm.summary.quickStats.OverallCpuUsage
        $vms.MemoryUsage = $vm.summary.quickStats.guestMemoryUsage
        $vms.ToolsStatus = $vm.guest.toolsstatus
        $vms.ToolsVersion = $vm.config.tools.toolsversion
        $vms.MemoryLimit = $vm.resourceconfig.memoryallocation.limit
        $vms.MemoryReservation = $vm.resourceconfig.memoryallocation.reservation
        $vms.CPUreservation = $vm.resourceconfig.cpuallocation.reservation
        $vms.CPUlimit = $vm.resourceconfig.cpuallocation.limit
        $vms."HW Version"= $vm.Config.Version
        $Report += $vms
    }

    $Report | ConvertTo-Html –title "Estadisticas de todas las Máquinas Virtuales VMware " –body "<H2>Estadisticas de todas las Máquinas Virtuales VMware.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    ######################################################
    # Información del Data Store utilizado por cada VM   #
    ######################################################

    $report = @()
    $virtualmachines = Get-VM
    foreach ($vm in $virtualmachines) {
        $dstores = $vm | Get-Datastore
        foreach($ds in $dstores){
            $row = "" | select VMname, datastore
            $row.VMname = $vm.name
            $row.datastore = $ds.Name
            $report += $row
        }
    }$report | ConvertTo-Html –title "Máquinas Virtuales y ubicación concreta en DataStore" –body "<H2>Máquinas Virtuales y ubicación concreta en DataStore.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    #############################################################
    # Máquinas Virtuales que no sincronizan su hora con los ESX #
    #############################################################

    Get-VM | Get-View | ? { $_.Config.Tools.syncTimeWithHost -eq $false } | Select Name | Sort-object Name | ConvertTo-Html –title "Máquinas Virtuales que no sincronizan su hora con los ESX" –body "<H2>Máquinas Virtuales que no sincronizan su hora con los ESX.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    ##############################################################
    # Porcentaje de espacio libre en las particiones de las VM   #
    ##############################################################

    Get-VM | Where { $_.PowerState -eq "PoweredOn" } | Get-VMGuest | Select VmName -ExpandProperty Disks | Select VmName, Path, @{ N="PercFree"; E={ [math]::Round( ( 100 * ( $_.FreeSpace / $_.Capacity ) ),0 ) } } | Sort PercFree | ConvertTo-Html –title "Porcentaje de espacio libre en las particiones de las VM" –body "<H2> Porcentaje de espacio libre en las particiones de las VM.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    ################################################
    # Errores encontrados en las ultimas 24 horas  #
    ################################################

    #Get-VIEvent -Start (Get-Date).AddHours(-24) -Type Error | Select-object CreatedTime, FullFormattedMessage | ConvertTo-Html –title "Errores encontrados las últimas 24 horas" –body "<H2>Errores encontrados las últimas 24 horas.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    ################################################
    # Errores encontrados en los ultimos 7 días    #
    ################################################

    #Get-VIEvent -Start (Get-Date).AddHours(-168) -Type Error | Format-Table CreatedTime, FullFormattedMessage -AutoSize | ConvertTo-Html –title "Errores encontrados en los últimos 5 días" –body "<H2>Errores encontrados en los últimos 5 días.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation
    Get-VIEvent -Start (Get-Date).AddHours(-168) -Type Error | Select-object CreatedTime, FullFormattedMessage | ConvertTo-Html –title "Errores encontrados los últimos 7 días" –body "<H2>Errores encontrados los últimos 7 días.</H2>" -head "<link rel='stylesheet' href='style.css' type='text/css' />" | Out-File -Append $filelocation

    #############################################
    # Salida del fichero HTML Y envío por mail  #
    #############################################
    if ($enablemail -match "yes")
    {
    $msg = new-object Net.Mail.MailMessage
    $att = new-object Net.Mail.Attachment($filelocation)
    $smtp = new-object Net.Mail.SmtpClient($smtpServer)
    $msg.From = $mailfrom
    $msg.To.Add($mailto)
    $msg.Subject = “Health Check del Entorno VMware de …”
    $msg.Body = “Informe Semanal creado por el Departamento de ..para….”
    $msg.Attachments.Add($att)
    $smtp.Send($msg)
    }

    #####################################################
    # Desconexión de la sesión contra el Virtual Center #
    #####################################################

    disconnect-viserver -confirm:$false

    ################################################################################
    # Cerrar el proceso de powershell en todos los hilso de ejecución del servidor #
    ################################################################################

    # EN MI CASO LOS HILOS DE POWERSHELL AL LANZARLO DESDE UNA TAREA PROGRAMADA DEJABA POWERSHELL.EXE EN # #EJECUCIÓN TRAS TERMINAR EL SCRIPT. POR LO TANTO EN EL SCRIPT QUE SE EJECUTABA EL ULTIMO, OBLIGABA QUE EL #PROCESO POWERSHELL.EXE DEL SERVIDOR FUERA ELIMINADO DE RAIZ. DESRENOMBRAR EN CASO DE QUE SE DESEE MATAR #DICHO PROCESO.

    #stop-process -Name Powershell

    #

    ##########################
    # Final de Script        #
    ##########################

    En otro post  veremos cómo dejar dicho script programado para su ejecución.

    miércoles, 21 de julio de 2010

    Soporte Extendido y Fin de Soporte en productos Microsoft

    Hola.

    Aquí os dejo unos datos que serán de vuestros interés.

    Productos entrando en Soporte Extendido

    • MOM 2005 entró en la fase de Soporte Extendido el 12 de Enero de 2010.
    • SMS 2003 and SMS 2003 R2 entró en la fase de Soporte Extendido el 12 de Enero de 2010.
    • Virtual Server 2005 and Virtual Server 2005 R2 entró en la fase de Soporte Extendido el 12 de Enero de
      2010
      .
    • Host Integration Server 2004 entró en la fase de Soporte Extendido el 12 de Enero de 2010.
    • Live Communications Server 2005 entró en la fase de Soporte Extendido el 13 de Abril de 2010.
    • ISA Server 2004 Enterprise entró en la fase de Soporte Extendido el 13 de Abril de 2010.
    • Windows Server 2003 entró en la fase de Soporte Extendido el 13 de Julio de 2010.
    • Point of Sale 1.0 entró en la fase de Soporte Extendido el 13 de Julio de 2010.

    Nota Importante:
    Durante la fase de Soporte Extendido, las actualizaciones de Seguridad están TODAVÍA disponibles. Sin embargo,
    para solicitar otras actualizaciones, ES NECESARIO disponer de un contrato de Soporte de Hotfixes Extendido
    (Extended Hotfix Support Agreement, EHSA).

     

    Productos finalizando su soporte

    Recientemente:

    • Dynamics NAV 4.0 entró en la fase de Soporte Extendido el 12 de Enero de 2010.

    A corto plazo:

    • Windows 2000 Server and Workstation NO será soportado a partir del 13 de Julio de 2010. Es muy
      importante disponer de un plan de actualización antes de esta fecha (servidores y puestos de trabajo) a un
      sistema operativo soportado (Windows Server 2008/R2, Windows Server 2003/R2, Windows 7/Vista/XP)
      para prevenir riesgos de seguridad potenciales en los sistemas de información.

    A medio plazo:

    • SQL Server 7.0 NO será soportado desde el 11 de Enero de 2011. Es recomendable actualizar los servidores
      afectados antes de esta fecha.
      Ciclo de Vida de Soporte Microsoft - Boletín Trimestral - Diciembre 2009 - 6 -
    • Exchange Server 2000 NO será soportado desde el 11 de Enero de 2011. Es recomendable actualizar los
      servidores afectados antes de esta fecha.
    • Dynamics GP 9.0 NO será soportado desde el 11 de Enero de 2011. Es recomendable actualizar los
      servidores afectados antes de esta fecha.

    Nota Importante: Las actualizaciones de Seguridad NO están disponibles para los productos No Soportados.

     

    Service Pack finalizando su soporte

     

    Recientemente:

    • SQL Server 2005 SP2 NO está soportado desde el 12 de Enero de 2010. Es recomendable actualizar a Service
      Pack 3 antes de esta fecha.
    • Dynamics GP 10.0 RTM NO está soportado desde el 12 de Enero de 2010. Es recomendable actualizar a
      Service Pack 3 antes de esta fecha.
    • Dynamics SL 7.0 RTM NO está soportado desde el 12 de Enero de 2010. Es recomendable actualizar a
      Service Pack 2 antes de esta fecha.
    • .Net Framework 2.0 SP1 NO está soportado desde el 12 de Enero de 2010. Es recomendable actualizar a
      Service Pack 2 antes de esta fecha.
    • SQL Server 2008 RTM NO será soportado a partir del 13 de Abril de 2010. Es recomendable actualizar a
      Service Pack 1 antes de esta fecha.
    • Windows Vista RTM NO será soportado a partir del 13 de Abril de 2010. Es recomendable actualizar a
      Service Pack 2 antes de esta fecha.
    • Dynamics NAV 5.0 RTM NO será soportado a partir del 13 de Abril de 2010. Es recomendable actualizar a
      Service Pack 1 antes de esta fecha.
    • Windows XP SP2 NO será soportado a partir del 13 de Julio de 2010. Es recomendable actualizar a
      Service Pack 3 antes de esta fecha.
    • Office 2007 SP1, Project Server 2007 SP1, SharePoint Server 2007 SP1, Visio 2007 SP1 NO serán soportados a partir del 13 de Julio de 2010. Es recomendable actualizar a Service Pack 2 antes de esta fecha

     

    A corto/medio plazo:

    • Windows Server Update Services 3.0 SP1 NO será soportado a partir del 25 de Agosto de 2010. Es
      recomendable actualizar a Service Pack 2 antes de esta fecha.
    • Exchange Server 2007 SP1 NO será soportado a partir del 12 de Octubre de 2010. Es recomendable
      actualizar a Service Pack 2 antes de esta fecha.
    • System Center Configuration Manager 2007 SP1 and System Center Configuration Manager 2007 R2 RTM
      NO será soportado a partir del 11 de Enero de 2011. Es recomendable actualizar al último Service Pack (SP2)
      antes de esta fecha.
    • Dynamics GP 10.0 SP1 NO será soportado a partir del 12 de Octubre de 2010 Es recomendable actualizar al
      último Service Pack (SP3) antes de esta fecha.
    • Dynamics GP 10.0 SP2 NO será soportado a partir del 11 de Enero de 2011. Es recomendable actualizar al
      último Service Pack (SP3) antes de esta fecha.
      Ciclo de Vida de Soporte Microsoft - Boletín Trimestral - Diciembre 2009 - 8 -
    • Dynamics AX 2009 RTM SP1 NO será soportado a partir del 11 de Enero de 2011. Es recomendable
      actualizar al último Service Pack (SP1) antes de esta fecha.
    • Dynamics SL 6.5 SP2 NO será soportado a partir del 11 de Enero de 2011. Es recomendable actualizar al
      último Service Pack (SP3) antes de esta fecha.
    • Dynamics SL 7.0 SP1 NO será soportado a partir del 11 de Enero de 2011. Es recomendable actualizar al
      último Service Pack (SP2) antes de esta fecha.

    Nota Importante: Las actualizaciones de Seguridad NO están disponibles para los Service Packs No Soportados.

    jueves, 1 de julio de 2010

    Modo Dios en Windows 7 y Windows 2008

    No es muy técnico que digamos este truco, es más bien una curiosidad que he descubierto hace poco.

    Si queremos tener un Panel de Control mucho más avanzado en nuestra máquina 2008 o Windows 7 sólo deberemos crear una carpeta y la llamaremos de la siguiente manera

    ModoDios.{ED7BA470-8E54-465E-825C-99712043E01C}