Uma maneira simples de obter o Windows Server 2008 para enviar alertas de email com pouco espaço em disco é usar o Agendador de Tarefas e o Log do Sistema. Se o espaço livre ficar abaixo da porcentagem especificada em HKLM \ SYSTEM \ CurrentControlSet \ Services \ LanmanServer \ Parâmetros \ DiskSpaceThreshold , um evento é registrado no log do sistema que pode acionar uma tarefa para enviar uma mensagem de email.
- Abra o Agendador de tarefas e crie uma nova tarefa.
- Insira um nome para a tarefa, selecione "Executar se o usuário está conectado ou não" e marque a opção "Não armazenar senha".
- Adicione um novo acionador na guia "Acionadores".
- Selecione "Em um evento" na caixa "Começar a tarefa".
- Defina Log como "System", Source como "srv" e Event ID como "2013".
- Adicione uma nova ação na guia Ações.
- Defina Ação para "Enviar um e-mail" e preencha o restante das configurações adequadamente.
- Para configurar quando o evento de pouco espaço em disco é registrado no Log do sistema, abra o Editor do Registro, navegue até HKLM \ SYSTEM \ CurrentControlSet \ Services \ LanmanServer \ Parâmetros e adicione um valor DWORD chamado “DiskSpaceThreshold”, definindo-o como percentual desejado. Quando a entrada não existe, o valor padrão é 10.