cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cbeydler
Engaged Sweeper III
Does anyone know if Lansweeper is planning on expanding its Active Directory piece in the near future? We are looking at solutions like ADManager Plus (From ManageEngine) to run reports on the AD server and manage users. Would love to have that rolled into Lansweeper and avoid the immense cost of a new product.
4 REPLIES 4
Lakatta
Engaged Sweeper III
Blighter, you win a prize.

This is perfect. I needed this!
blighter
Engaged Sweeper III
I did this as a Powershell script and set it to run every day at 12 noon.
Works for me 🙂 Notifies users of passwords expiring within 3 days.

It's quite messy but haven't had the time to tidy it up yet:

import-module activedirectory

$maxdays=(Get-ADDefaultDomainPasswordPolicy).MaxPasswordAge.TotalDays
$summarybody="Name `t ExpireDate `t DaysToExpire `t EmailSentTo `n"

(Get-ADUser -SearchBase "OU=Users,DC=DOMAIN,DC=NET" -filter {(Enabled -eq "True") -and (PasswordNeverExpires -eq "False")} -properties *) | Sort-Object pwdLastSet |
foreach-object {

$lastset=Get-Date([System.DateTime]::FromFileTimeUtc($_.pwdLastSet))
$expires=$lastset.AddDays($maxdays).ToShortDateString()
$daystoexpire=[math]::round((New-TimeSpan -Start $(Get-Date) -End $expires).TotalDays)
$samname=$_.samaccountname
$emailTo=$_.mail
if ($emailTo -eq $null)
{
$emailTo="it.department@company.com"
}
$firstname=$_.GivenName
if ($daystoexpire -le 3){
$ThereAreExpiring=$true

$emailFrom = "it.department@company.com"
$subject = "$firstname, your password expires in $daystoexpire day(s)"
$body = "$firstname,
Your password expires in $daystoexpire day(s).

Please press Ctrl + Alt + Del -> Change password. Your new password must have at least: one number, one capital letter, be 8 characters long and not one of your previous 5 passwords.

It is important that this is changed before it expires or you could face problems accessing the corporate network.

Sent to: $emailTo"

$smtpServer = "mailserver.domain"
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $body)

$summarybody += "$samname `t $expires `t $daystoexpire `t $emailTo `n"
}
}
if ($ThereAreExpiring) {
$summarybody += " `n Users have been notified :)"
$emailFrom = "it.department@company.com"
$emailTo = "it.department@company.com"
$subject = "Expiring passwords"
$body = $summarybody
$smtpServer = "mailserver.domain"
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $body)
$body
}
Hemoco
Lansweeper Alumni
Which are the exact features that you are looking for?
cbeydler
Engaged Sweeper III
Lansweeper wrote:
Which are the exact features that you are looking for?


We would be looking for features such as password expiration reports, number of failed logins, things like that.

This is the feature-set of ADManager which is extensive. Not expecting anything at that level, but some more informative reports would go a long way with usability within Lansweeper.