Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Password Expiry Notification Issues

$
0
0

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:

https://www.interworks.com/blog/trhymer/2013/07/08/powershell-how-encrypt-and-store-credentials-secu...

Powershell
<# Set and encrypt credentials to file using default method #>$cred=Get-Credential$cred.Password|ConvertFrom-SecureString|Set-Contentpath\To\SecureFile.txt
Now for the script itself. I have the variables setup as follows:
Powershell
# 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=...
<# Set and encrypt credentials to file using default method #>

Viewing all articles
Browse latest Browse all 15370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>