Description
Send-PasswordExpiryNotification.ps1 has the SMTP server address hardcoded as x.x.x.x (a placeholder value) at script scope. The script cannot function without manually editing the source code.
Impact
The script will fail on every execution until someone edits the $smtpServer variable directly in the source file.
Fix
Convert $smtpServer to a mandatory parameter (or a parameter with a sensible default), so users can provide it at runtime:
[Parameter(Mandatory = $true)]
[string]$SmtpServer
Other hardcoded values ($fromAddress, $defaultSearchBase, $logDirectory) should also be parameterized.
Files Affected
Scripts/ActiveDirectory/Send-PasswordExpiryNotification.ps1