Give the receiver email address,sender email address and sender app password
Sender = "firstname.lastname@example.org" ## Provide the From Email address from which the mail to be send
Password = "pgihmssgyguhhhhd" ##Provide the 16 digit app password for sender email
emailto= "email@example.com" ## receiver email address
1.Run the script as Local System User
2. Enable 2 factor authentication for sender email address from that account
3. Create app password for sender email address which you have to provide in the script.
This is the Script to list out the Default User accounts available in the Endpoint and sends the report to the preferred email address.