Hello PS group, I hope you can help me with a script I've been modifying for our environment. The script in question is here:
https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27
I've modified the script to house my credentials in a secure way via this document:
Powershell
<# Set and encrypt credentials to file using default method #>$cred=Get-Credential$cred.Password|ConvertFrom-SecureString|Set-Contentpath\To\SecureFile.txtPowershell
# Please Configure the following variables....$creds=Get-Content'path\To\Secure\String.txt'|ConvertTo-SecureString$credential=New-ObjectSystem.Management.Automation.PSCredential($from,$creds)$smtpServer="smtp.office365.com"$smtpCred=$credential$expireindays=...