Added htm template
Completed script header information
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
Also change the function SendMailv2 in a way that it can be used in your specific case.
|
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
|
.NOTES
|
||||||
Author: D.de Kooker - info@dcomputers.nl
|
Author: D.de Kooker - info@dcomputers.nl
|
||||||
Version: 1.1
|
Version: 1.1
|
||||||
@@ -17,7 +19,7 @@
|
|||||||
|
|
||||||
.LINK
|
.LINK
|
||||||
The latest version can Always be found on my GIT page on the link below:
|
The latest version can Always be found on my GIT page on the link below:
|
||||||
|
https://gittea.dannydekooker.nl/Dcomp/PUB-PowershellScripts
|
||||||
|
|
||||||
.COMPONENT
|
.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.
|
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
|
#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) {
|
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"
|
$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""`@"
|
Invoke-Expression "`$VAR_Body = `@""`n`r$INP_Body`n`r""`@"
|
||||||
|
|
||||||
SendMailv2 -To $VAR_User_Email -Subject $VAR_Subject -Body $VAR_Body
|
SendMailv2 -To $VAR_User_Email -Subject $VAR_Subject -Body $VAR_Body
|
||||||
30
Active Directory/account-expiration-template.htm
Normal file
30
Active Directory/account-expiration-template.htm
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
|
||||||
|
<style>
|
||||||
|
body{
|
||||||
|
font-family: 'calibri', sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Beste $VAR_User_Name,</p>
|
||||||
|
|
||||||
|
<p>Uw wachtwoord van het account <B>$VAR_User_Account</B> op het domein $STR_Domain verloopt op <B>$STR_ExpireDate_String</B>.<br />
|
||||||
|
Login op uw account en reset het wachtwoord.</p>
|
||||||
|
|
||||||
|
<p>Het wijzigen van het wachtwoord kan door in te loggen op het systeem,<br />
|
||||||
|
zoek vervolgens in het startmenu naar de map Self Service hierin staat een koppeling naar "Wachtwoord wijzigen".</p>
|
||||||
|
|
||||||
|
<p>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).</p>
|
||||||
|
|
||||||
|
<p><b>Tips voor het aanmaken van een veilig wachtwoord:</b><br />
|
||||||
|
<a href=https://www.security.nl/posting/38906/Security+Tip+van+de+Week%3A+maak+een+veilig+wachtwoord>In dit artikel op security.nl kunt je er alles over lezen.</a></p>
|
||||||
|
|
||||||
|
<p>Mochten er vragen zijn naar aanleiding van deze mail, kunt u de Servicedesk bereiken op onderstaande gegevens.</p>
|
||||||
|
|
||||||
|
<p>Met vriendelijke groet,<br>
|
||||||
|
<B>Servicedesk ICT</B><br>
|
||||||
|
</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user