I can get the correct username in the notification mail, but the username will show a question mark in the report. My language tag is ZH-TW
Is it ? for the whole user, or just the characters in cannot interpret? The encoding is set to UTF-8 at the beginning so perhaps try a different one?
correct format : Jacky Tsao (曹玄聰) fault format : Jacky Tsao (???) The CSV file received incorrect content. How can i modify the program code when the CSV file is exporting.
It is an issue with how powershell displays characters, so you will need to make sure your console is set with the right locale information. I dont have much experience of it im afraid, this may be useful. https://stackoverflow.com/ques tions/49476326/ displaying-unic ode-in-powershe ll
When choosing test user , only this user will get an email , correct?
That's correct because $emailaddress = $testRecipient on line 276
Hi all, We experience a problem with sending the emails from the script. When I am using the testing parameter everything looks ok: the logs says Send-email OK and I receive the e-mail. When we omnit -testing the users don't reveive the email and in the log there's an error message. When using the -Status parameter we see the error "The specified string is not in the form required for an email address." on the console. However the $emailaddress is filled with a correct email address string.
Hello Robert, (and everyone) Everything works, I'm in a 365 environment, with a 2012r2 AD. The only thing that does not work is the shipment report to our tech service mailbox. I provide my order without sensitive information : -command "C:\SCRIPTS\MAIL_REMINDER\Mail _Reminder_Pwd_E xpire.ps1 -smtpServer smtp.office365. com -expireInDays 15 -from 'Service Informatique <passwordexprir e@****.fr>' -logging -LogPath C:\SCRIPTS\MAIL _REMINDER\LOGS -reportTo informatique@** **.fr -interval 1,2,5,10" Regards !
Hi Robert, Thanks for sharing this script, it's fantastic. I tested it a few times and it works great. However, when I tried to create a schedule task with the script and run it, it will prompt for smtp server? I tried to enter -command "C:\PasswordChangeNotification .ps1 -smtpServer smtp.xxx.com -expireInDays 14 -from "IT Support <helpdesk@xxx.c om>" -Logging -LogPath "c:\temp" -testing -testRecipient admin@xxx.com" in the argument section. This does not work as well. I used the testing to test the notification in the scheduler before blasting to all users. I am connecting to my smtp server with no authentication. Appreciate your advice.
PS D:\Password_Reminder_Scripts> .\PasswordChang eNotification.p s1 -smtpServer exch-mb -expireInDays 309 -from "Password Reminder <password_remin der@domain.com> " -logging =logPath D:\Password_Rem inder_Scripts\L ogging -testing -testRecipient me@domain.com D:\Password_Rem inder_Scripts\P asswordChangeNo tification.ps1 : Cannot process argument transformation on parameter 'status'. Cannot convert value "System.String" to type "System.Managem ent.Automation. SwitchParameter ". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0. At line:1 char:150 + ... .com>" -logging =logPath D:\Password_Rem inder_Scripts\L ogging -testin ... + ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~ + CategoryInfo : InvalidData: (:) [PasswordChange Notification.ps 1], ParameterBindin gArgumentTransf ormationExcepti on + FullyQualifiedE rrorId : ParameterArgume ntTransformatio nError,Password ChangeNotificat ion.ps1
Thank you, sorry I missed that. With the test, I am getting emails for everyone regardless of what the age is.
I am trying to setup my Scheduled Task but it seems that it does not like the credentials for O365. I have tried using a domain admin account and my own but I can't get past the login during testing. Any ideas?
Review this, https://www.youtube.com/watch? v=_-JHzG_LNvw&t =1s
Hello Robert, i have a question about your script. when i start it manually - everything works correctly. in report i see that the emails were sent correctly. but when i put it into task scheduler i see in the report: Skipped - interval what should be wrong? of course i am talking about the same person. MANUAL RUN: 10 Tom Tom Li 30. 7. 2019 10:00:38 10 26. 1. 2020 10:00:38 OK TASK SCHEDULER: 10 Tom TOM Li 30. 7. 2019 10:00:38 10 26. 1. 2020 10:00:38 Skipped - Interval Thank you
Hello I added this script to task scheduler as shown on youtube video. But task scheduler disables this script itself. I enable but 1 sec later it disable again. What is the problem? Can you help me? Have a nice day, Best Regards
Hi guy, This is normal, windows treats plan tasks like that. It starts and then stops the task, etc. Depending on the frequency. Trying to follow a complete loop by refreshing the window
Hello, I am currently assisting on building the company's infrastructure, and I was asked to look into sending an email out to our employees on letting them know that their password will expire soon. Where do I add this script and how do I add it without any issues? Thank you in advance.
Well id like to tell you how to do it without issues but i cannot. You can use the instructions in the youtube videos on how to setup and schedule the script.