Warn about computers which are in the default container ‘Computers’

Warn about computers which are forgotten in default container, not added to the accurate OU.

$body = Get-QADComputer -SearchRoot ‘CN=Computers,DC=domain,DC=local’
If ($body -ne $Null) {
$emailFrom = “alert@mail.cz”
$emailTo = “sup@mail.cz”
$subject = “Computers”
$body = $body
$smtpServer = “10.1.1.20”
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $body)
}

Advertisements