Recall & Review
beginner
What is the main purpose of a monitoring script with email alerts?
To automatically check system or application status and send an email notification if an issue or specific condition is detected.
Click to reveal answer
beginner
Which PowerShell cmdlet is commonly used to send email alerts in monitoring scripts?The <code>Send-MailMessage</code> cmdlet is used to send email messages from PowerShell scripts.Click to reveal answer
intermediate
What parameters are essential for the <code>Send-MailMessage</code> cmdlet to send an email?You need
-From, -To, -Subject, -Body, and -SmtpServer parameters at minimum.Click to reveal answer
intermediate
How can you check if a service is running in a PowerShell monitoring script?
Use
Get-Service -Name 'ServiceName' and check the Status property to see if it is 'Running'.Click to reveal answer
intermediate
Why is it important to include error handling in monitoring scripts with email alerts?
Error handling ensures the script can catch problems and still send alerts or log issues instead of silently failing.
Click to reveal answer
Which PowerShell cmdlet sends an email alert?
✗ Incorrect
The correct cmdlet to send emails in PowerShell is Send-MailMessage.
What parameter specifies the SMTP server in Send-MailMessage?
✗ Incorrect
The parameter to specify the SMTP server is -SmtpServer.
Which property do you check to see if a service is running?
✗ Incorrect
The Status property shows if a service is Running or Stopped.
What is a good reason to send email alerts from monitoring scripts?
✗ Incorrect
Email alerts notify admins quickly so they can fix problems fast.
Which of these is NOT required for Send-MailMessage to send an email?
✗ Incorrect
Password is not a required parameter; authentication depends on SMTP server settings.
Describe how you would create a simple PowerShell script to monitor a service and send an email alert if it is stopped.
Think about checking status first, then sending email if needed.
You got /4 concepts.
Explain why monitoring scripts with email alerts are useful in managing IT systems.
Consider the benefits of automation and fast alerts.
You got /4 concepts.