norman eng
asked on
Power Shell invalid syntax.
Hi Experts, I am very new to PowerShell scripting, came across an script that is for AD password expiry notification from TechNet, I tried to input the variables, but somehow there is some error that I don't really understand.
The first error is Missing ')' in function parameter list.
The second error is Unexpected token ')' in expression or statement.
Kindly refer to the attached file for the scripting error syntax, and the original file that I have download from TechNet.
The file that I have download is from this source.
https://gallery.technet.microsoft.com/scriptcenter/Password-Expiry-Email-177c3e27
Kindly advise.
scripting-issue.png
The first error is Missing ')' in function parameter list.
The second error is Unexpected token ')' in expression or statement.
Kindly refer to the attached file for the scripting error syntax, and the original file that I have download from TechNet.
The file that I have download is from this source.
https://gallery.technet.microsoft.com/scriptcenter/Password-Expiry-Email-177c3e27
Kindly advise.
scripting-issue.png
ASKER
hi oBdA thank you for your input, it has indeed resolve the error, but after I have edited the script inputting the default value (Kindly refer to the attached scripting issue_v2) , and run the script, it will prompt me to input the value again, (kindly refer to the prompting.png).
kindly advise.
Thanks.
Scripting-issue_v2.PNG
Prompting.PNG
kindly advise.
Thanks.
Scripting-issue_v2.PNG
Prompting.PNG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi oBdA, got it, thanks alot.
ASKER
thanks alot, it works.
As in
Open in new window
Open in new window