Top 10 Windows Server tips of 2009

Acesse! Exelente material de WINDÃO,295582,sid68_gci1377170,00.html?track=NL-1112&ad=741425&asrc=EM_NLT_10460800&uid=6314508

01 Troubleshooting poor client logon performance
By Gary Olsen, Published 06.15.2009

02 Troubleshooting your toughest Windows server crashes
By Bruce Mackenzie-Low, Published 04.22.2009

03 10 things you don’t know about Windows 2008 R2
By Jonathan Hassell, Published 09.25.2009

04 Troubleshooting Windows print spooler crashes
By Bruce Mackenzie-Low, Published 05.26.2009

05 Simple techniques for finding Windows memory leaks
By Bruce Mackenzie-Low, Published 06.25.2009

06 How to find and remove lingering objects in AD
By Gary Olsen, Published 11.04.2009

07 Troubleshooting app crashes or hangs in Windows
By Bruce Mackenzie-Low, Published 10.02.2009

08 Scripting DC installations: A must for Server Core
By Greg Shields, Published 02.13.2009

09 Top 25 Windows PowerShell commands
By Jonathan Hassell, Published 09.01.2009

10 How Windows servers get hacked
By Kevin Beaver, Published 12.09.2009


Rate (Your) Network Diagram

Vários desenhos maneiros


Clonando máquinas virtuais utilizando ESXi

Clonando máquinas virtuais utilizando ESXi.

Caso alguém saiba o comando para adicionar máquinas ao inventário, e também o comando para gerar um novo UUID, me avise que eu atualizo o script para que faça automaticamente.

O script foi feito para ser executado no diretório raiz do seu volume de storage.

# chmod +x

# ./ template novo

onde: template (nome da maquina virtual que se deseja clonar) novo (nome da nova maquina virtual)


echo "Criando diretório para a vm $2"
mkdir $2
cd $2
echo "Copiando imagem de disco da vm $1 para vm $2"
cp ../$1/*.vmdk .
vmkfstools -E $1.vmdk $2.vmdk
echo "Criando a nova máquina $2"
cp ../$1/$1.nvram ./$2.nvram
cp ../$1/$1.vmsd ./$2.vmsd
cat ../$1/$1.vmxf | sed -e "s/$1/$2/g" > $2.vmxf
chmod 600 $2.vmxf
cat ../$1/$1.vmx | sed -e "s/$1/$2/g" > $2.vmx
chmod 755 $2.vmx

echo '

Criação concluída, para integrá-la ao servidor de VM, proceda com os passos abaixo:

-> Importar o "novo.vmx" para o inventario

1) Browse Storage no diretório "novo"
2) Procurar o arquivo "novo.vmx"
3) Clicar com o botao direito sobre o arquivo "novo.vmx"
4) Escolher "Add to inventory"

-> Criar novo UUID para a máquina

1) Ligar a nova VM
2) Clicar com o botao direito sobre a nova VM
3) Escolher "Answer Question"
4) Escolher "Create"

Be Happy !!!

By Kl0Nez

National Checklist Program Repository

Essa dica veio do meu amigo klones

The National Checklist Program (NCP), defined by the NIST SP 800-70 Rev. 1, is the U.S. government repository of publicly available security checklists (or benchmarks) that provide detailed low level guidance on setting the security configuration of operating systems and applications. NCP is migrating its repository of checklists to conform to the Security Content Automation Protocol (SCAP). SCAP enables standards based security tools to automatically perform configuration checking using NCP checklists. For more information relating to the NCP please visit the information page or the glossary of terms.

Search for Checklist using the fields below. The keyword search will search across the name, and summary.

Troubleshooting poor Windows logon performance in Active Directory environments

Problems based around performance are often the most frustrating to resolve, mainly because there are so many variables to consider. In this article, I will focus on the difficult issue of diagnosing and resolving slow logon performance for users when logging in to their domain accounts.

When troubleshooting any performance problem, you must first define what is an acceptable delay. I’ve seen some environments where users experience 5-10 minute logon times and they don’t complain simply because they are used to it. Then I’ve seen others scenarios where even a one minute delay is considered unacceptable. That’s why it’s important to first define what is reasonable so that you know when you have solved the problem.

Windows logon performance factors

It’s important to consider a variety of factors when looking for the cause of logon performance issues. Some of these factors include:

  • the proximity of domain controllers to your users
  • network connections and available bandwidth
  • hardware resources on the DCs (x64 vs. x86, memory, etc.)
  • the number of Group Policy Objects (GPOs) applied to the user and computer (which directly affects bandwidth)
  • the number of security groups the user and computer are members of (also directly affects bandwidth)
  • GPOs containing settings that require extra processing time such as:
    • loopback processing
    • WMI filters
    • ACL filtering
  • heavily loaded domain controllers caused by:
    • applications requiring authentication
    • inefficient LDAP queries from user scripts or applications (see my article on taming the LSASS.exe process for more details)
    • a DC hosting other apps such as Exchange, IIS, SQL Server, etc.
  • client configuration
    • memory, disk, processor,etc.
    • network Interface (10/100/1000)
    • subnet mapped properly to the site
    • DNS configuration

Define the scope

I always spend time asking basic questions in order to define the true scope of the problem. This will take some effort because these problems are usually defined by users who complain, while there may also be users who have just learned to live with it. Below are some important questions to ask:

  • Are the problems defined to a single site, security group, OU, department, type of client (laptop or desktop), or OS?
  • Does the problem happen at a particular time of day?
  • Does the problem occur when you are in the office or connecting over the VPN?
  • Describe the symptoms:
    • Does the delay occur at a specific point each time (i.e. “Network Settings” on the logon screen)
    • Does it occur before or after the logon screen?
  • When did this start happening?

Tools and data gathering

There are some basic tools that I use to gather data. For performance problems, I like to cast a wide net and collect all that I can. Here are some examples:

  • Run Microsft Product Support Reports (MPSreports) on clients and their authenticating DCs. This is a common tool that collects data for all event logs, MSINFO32, NetDiag, IPConfig, drivers, hotfixes and more. Hewlett-Packard also has its own version called HPS Reports which is, in my opinion, superior to Microsoft’s tool and will collect specific Active Directory data if run on a DC. It also collects a plethora of hardware-related information, even for non-HP hardware.
  • On the client, use Microsoft KB article 221833 to set verbose logging for Winlogon. This will provide excellent details in the %Systemroot%\Debug\UserMode\Userenv.log file. Note that this log does not contain date stamps, so you must:
    1. delete the existing userenv.log from the client
    2. enable verbose logging per KB 221833
    3. logoff, logon, and save the userenv.log to a new location in order to limit data collection for the logon period.

Note that the userenv.log is excellent at following GPO and profile processing, and often you can clearly see where a logon delay occurs, indicated by a long interval between events.

  • Enable Net Logon logging. The Netlogon log is located in %systemroot%\debug and will be empty if logging is not enabled. This is an excellent source of information. For instance, it will show you which clients in subnets that are not mapped to a site. This can cause a client to go to an out-of-site DC for authentication and result in a longer than expected logon time.
  • Run Process Monitor from Sysinternals. Look in the Help section for details on enabling boot logging. You can capture the process information during the slow boot to see which processes might be affecting performance.

Other tips for troubleshooting slow client logons

There are a few more quick things you can do to see if your logon performance is caused by a known issue.

First, examine the GPResult.exe and LOGONSERVER environment variable on the client. While MPSreports and HPS Reports collect the GPResult for the logged on user, they don’t collect the LOGONSERVER variable which points to the authenticating DC. This is important because each time a user logs in, the GPOs are downloaded to the client. SYSVOL — which contains the GPOs — is a DFS root, however, and does not obey client site awareness. Instead, it collects the DCs (hosting the SYVOL DFS root) in a randomized order, then the GPOs are downloaded from the first DC in the list.

I have seen situations where clients in a main hub site would go across a slow WAN link to an out-of-site DC in order to get the GPOs, causing very slow logon times. Since this could change on each logon, the problem was intermittent.

Examine the GPResult for the DC that the GPOs were downloaded from and see if the GPOs are coming from an out-of-site DC. Also compare the LOGONSERVER variable to see if the client is being authenticated to an out-of-site DC. The logon delay could be explained through this “normal” behavior using known slow or busy links.

Another good test is to boot to Safe Mode with Networking and see if the delay occurs. If not, then do a Net Start and list all the services started. Then boot in normal mode and run Net Start and list all the services again. The difference should point to services that may be suspect, and eliminating them one at a time should help you identify the problem. You can also try disabling applications that start on boot to see if an application is getting in the way.

One final technique is usually to take a network trace using Netmon, Wireshark or another network capture utility. Since you are trying to capture the logon process, one good way to do this is to connect a dumb hub to the network cable going to the switch, then connect a cable from the hub to the problem PC and connect another cable to another PC or laptop that has Netmon or WireShark installed. Run the capture tool in promiscuous mode and reproduce the logon. This setup will ensure that the capture collects traffic in and out of the client and eliminates the network noise.

These are the basics to get you started. Just remember that there are no magic solutions – it really just takes time and detective work to find the problem. In an upcoming article, I will describe the methods I used in some case studies that should help tie this all together.

Texto Gary Olsen

fonte: Windows Server Tips:

Upgrading ESXi 3.x to Esxi 4.0


Vi em exelente site

Bom video sobre Cloud Computing

List All VMs

Ps: precisa ter o VMware VI Remote CLI instalado.

#!/usr/bin/perl -w
# Copyright 2006 VMware, Inc.  All rights reserved.
# This script prints names of all VM’s with Windows guest
# –server <VC Server> –username <username> –password <password>

use strict;
use warnings;

use VMware::VIRuntime;

# read/validate options and connect to the server

# find datacenter
my $intype;
$intype = “Datacenter”;

my $datacenter_views = Vim::find_entity_views(view_type => ‘Datacenter’);

my $counter = 0;
print “DataCenters found:\n”;
foreach (@$datacenter_views) {
print “Datacenter: ” . $_->name . “\n”;

my @vms;
my $vmcount = 0;

print “\n –VMs found:\n”;
# get all VM’s under this datacenter
my $vm_views = Vim::find_entity_views(view_type => ‘VirtualMachine’, begin_entity => $_);
foreach (@$vm_views) {
my $vm_name = $_->name;

push (@vms, $vm_name);

@vms = sort {lc $a cmp lc $b} @vms;

foreach my $vm_name (@vms) {
print ” — VM: $vm_name\n”;
print ” — Total VMs: $vmcount\n”;


print “Total Datacenters: $counter\n”;

# disconnect from the server

Script para listar todos os arquivos de pastas de subpastas e gerar um indice em html

Infelizmente não fiz o script para ser executado diretamente a uma unidade de disco, pois  a pasta System Volume Information apresenta erro de acesso negado.
Escolha uma pasta e teste.
Caso alguém melhore o script avise que eu coloco a versão melhorada, ou coloco um link para a mesma.

'Script para listar todos os arquivos de pastas de subpastas e gerar um indice em html.
'Fonte: e
'Romeu Avancini 23-11-2008

Set objFSO = CreateObject("Scripting.FileSystemObject")
Const ForAppending = 2
Const NO_OPTIONS = 0
Set objShell = CreateObject("Shell.Application")

Set objFolderSelect = objShell.BrowseForFolder _
    (WINDOW_HANDLE, "Selecione a pasta onde será gravado o LOG:", NO_OPTIONS, " ")       
Set objFolderItemDest = objFolderSelect.Self
strEndFolder = objFolderItemDest.Path

LogFile = strEndFolder & "\index.html"
Dim objLogFile:Set objLogFile = objFSO.CreateTextFile(logfile, 2, True)

Set objFolderSelect = objShell.BrowseForFolder _
    (WINDOW_HANDLE, "Seleciona a pasta a ser gerado o relatorio:", NO_OPTIONS, " ")
Set objFolderItem = objFolderSelect.Self
objStartFolder = objFolderItem.Path

Set objFolder = objFSO.GetFolder(objStartFolder)
objLogFile.Write "<Font face='Arial' Color='Red'><b> Pasta Raiz : " & objFolder.Path & "</b></Font><br>"
objLogFile.Writeline "<Font face='Arial' Color='Red' size='5'>------------------------------------------------------------------------</Font><br>"
Set colFiles = objFolder.Files
For Each objFile in colFiles
    objLogFile.Write  "<Font face='verdana' Color='black' size='2'><a href='" & objFolder.Path &"\"& objFile.Name & "'><b>" &  objFile.Name & "</b></a></Font><br>"

ShowSubfolders objFSO.GetFolder(objStartFolder)

Sub ShowSubFolders(Folder)
    For Each Subfolder in Folder.SubFolders
		objLogFile.Writeline "<Font face='Arial' Color='Red' size='5'>------------------------------------------------------------------------</Font><br>"
        objLogFile.Write "<Font face='Arial' Color='Red'><b>" &  Subfolder.Path & "</b></Font><br>"
		objLogFile.Writeline "<Font face='Arial' Color='Red' size='5'>------------------------------------------------------------------------</Font><br>"
        Set objFolder = objFSO.GetFolder(Subfolder.Path)
        Set colFiles =objFolder.Files
        For Each objFile in colFiles
            objLogFile.Write "<Font face='verdana' Color='black' size='2'><a href='" & Subfolder.Path &"\"& objFile.Name & "'><b>" &  objFile.Name & "</b></a></Font><br>"
        ShowSubFolders Subfolder
End Sub

objLogFile.Writeline "<p>"
objLogFile.Write "<Font face='verdana' Color='blue' size='2'><a href=''><b>Dicas TI Blog</b></a></Font><br>"
objLogFile.Writeline "<Font face='verdana' Color='black' size='2'>" & xFiles & " arquivos nas " & xFolders & " pastas e subpastas!</font>"

wscript.echo "Fim do script!"


Passei na prova da VMWare VCP-310

Aê passei na bendita prova da vmware, mas ainda não sou VCP, pois preciso fazer o curso oficial para ganhar o titulo.
Basicamente eu segui as dicas do Manfrin em dicas de certificação.
Vamos esperar e rezar para o dolar abaixar, pois o valor é um pouco salgado para fazer por conta própria com o dolar em alta.