diff --git a/Active Directory/Solvinity_Account-expiration-send_mail.ps1 b/Active Directory/Account-expiration-send_mail.ps1 similarity index 94% rename from Active Directory/Solvinity_Account-expiration-send_mail.ps1 rename to Active Directory/Account-expiration-send_mail.ps1 index ca8fe15..5feffc9 100644 --- a/Active Directory/Solvinity_Account-expiration-send_mail.ps1 +++ b/Active Directory/Account-expiration-send_mail.ps1 @@ -8,6 +8,8 @@ Also change the function SendMailv2 in a way that it can be used in your specific case. + This scripts need to be put in the same folder as the account-expiration-template.htm file, please change this according to your (company's)needs. + .NOTES Author: D.de Kooker - info@dcomputers.nl Version: 1.1 @@ -17,7 +19,7 @@ .LINK The latest version can Always be found on my GIT page on the link below: - + https://gittea.dannydekooker.nl/Dcomp/PUB-PowershellScripts .COMPONENT In order to run this script you will need the ActiveDirectory Powershell Module and in order to send email you will need a working SMTP server. @@ -86,7 +88,7 @@ #Send email message if password is expiring if ($VAR_DaysRemaining -eq $STR_FirstReminder -or $VAR_DaysRemaining -le $STR_DailyReminders -and $null -ne $VAR_User_Email -and $VAR_DaysRemaining -ge 0) { $VAR_Subject = "Uw $STR_Domain wachtwoord verloopt over $VAR_DaysRemaining dagen" - $INP_Body = Get-Content "$($MyInvocation.MyCommand.Path | Split-Path -Parent)\Template-KSANL.htm" -Raw + $INP_Body = Get-Content "$($MyInvocation.MyCommand.Path | Split-Path -Parent)\account-expiration-template.htm" -Raw Invoke-Expression "`$VAR_Body = `@""`n`r$INP_Body`n`r""`@" SendMailv2 -To $VAR_User_Email -Subject $VAR_Subject -Body $VAR_Body diff --git a/Active Directory/account-expiration-template.htm b/Active Directory/account-expiration-template.htm new file mode 100644 index 0000000..5795475 --- /dev/null +++ b/Active Directory/account-expiration-template.htm @@ -0,0 +1,30 @@ + +
+ + + + +Beste $VAR_User_Name,
+ +Uw wachtwoord van het account $VAR_User_Account op het domein $STR_Domain verloopt op $STR_ExpireDate_String.
+ Login op uw account en reset het wachtwoord.
Het wijzigen van het wachtwoord kan door in te loggen op het systeem,
+ zoek vervolgens in het startmenu naar de map Self Service hierin staat een koppeling naar "Wachtwoord wijzigen".
Maak daar een nieuw wachtwoord aan (vul daartoe eerst je oude wachtwoord in gevolgd door het nieuwe gewenste wachtwoord en bevestig vervolgens dit nieuwe wachtwoord).
+ +Tips voor het aanmaken van een veilig wachtwoord:
+ In dit artikel op security.nl kunt je er alles over lezen.
Mochten er vragen zijn naar aanleiding van deze mail, kunt u de Servicedesk bereiken op onderstaande gegevens.
+ +Met vriendelijke groet,
+ Servicedesk ICT
+