{"id":85,"date":"2016-04-25T21:30:08","date_gmt":"2016-04-25T19:30:08","guid":{"rendered":"http:\/\/rolig.dk\/?p=85"},"modified":"2016-04-25T21:30:08","modified_gmt":"2016-04-25T19:30:08","slug":"send-an-email-if-osd-fails","status":"publish","type":"post","link":"https:\/\/rolig.dk\/?p=85","title":{"rendered":"Send an Email if OSD fails"},"content":{"rendered":"<p>You can send an email if OSD fails on a Pc. <a href=\"https:\/\/onedrive.live.com\/redir?resid=447ADB7F2AA023F5!10915&amp;authkey=!ABTLDiQQfNwEfnA&amp;ithint=folder%2cps1\" target=\"_blank\" rel=\"noopener noreferrer\">Get the \u201cSendMail.ps1\u201d here<\/a> and save the script on the SCCM server.<\/p>\n<p>Changes the following lines in the script:<\/p>\n<p>1. Add you from email address in <strong>line 7<\/strong><br \/>\n2. Add you email address in <strong>line 9<\/strong><br \/>\n3. Add the SMTP server in <strong>line 11<\/strong><\/p>\n<p>We are going to use status filtering rules to look for Message ID \u201c11170\u201d. This means that OSD have failed. Follow these step to set it up in SCCM:<\/p>\n<p>1. Open the SCCM console and navigate to: Administration \u2013&gt; Site Configuration \u2013&gt; Sites<br \/>\n<a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/04\/image-17.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/04\/image_thumb-17.png\" alt=\"image\" width=\"551\" height=\"524\" border=\"0\" \/><\/a><\/p>\n<p>2. Right click on you Primary site and choose \u201cStatus Filter Rules\u201d<br \/>\n<a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/04\/image-18.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/04\/image_thumb-18.png\" alt=\"image\" width=\"560\" height=\"553\" border=\"0\" \/><\/a><\/p>\n<p>3. Click \u201cCreate\u2026\u201d to create aa new rule<\/p>\n<p>4. On the general tab gibe it a name. Mark \u201cSource\u201d and choose \u201cClient\u201d. Mark Message ID and write \u201c11170\u201d<br \/>\n<a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/04\/image-19.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/04\/image_thumb-19.png\" alt=\"image\" width=\"565\" height=\"518\" border=\"0\" \/><\/a><\/p>\n<p>5. On the Action tab mark \u201cRun a program\u201d and put in the path to PowerShell, SendMail script and the name of the task sequence. In this examble: \u201cC:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -file D:\\Install\\SendMail.ps1 -ComputerName %msgsys -TS &#8220;Microsoft Windows Deployment&#8221;\u201d. Click \u201cOk\u201d<br \/>\n<a href=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/04\/image-20.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"image\" src=\"https:\/\/rolig.dk\/wp-content\/uploads\/2016\/04\/image_thumb-20.png\" alt=\"image\" width=\"572\" height=\"522\" border=\"0\" \/><\/a><\/p>\n<p>SCCM will now send an email every time a Pc fail during OSD.<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Frolig.dk%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F85&amp;text=Hey%20check%20this%20out\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/rolig.dk\/wp-content\/plugins\/social-media-feather\/synved-social\/addons\/extra-icons\/image\/social\/circle\/96x96\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&amp;url=https%3A%2F%2Frolig.dk%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F85&amp;title=Send%20an%20Email%20if%20OSD%20fails\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/rolig.dk\/wp-content\/plugins\/social-media-feather\/synved-social\/addons\/extra-icons\/image\/social\/circle\/96x96\/linkedin.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>You can send an email if OSD fails on a Pc. Get the \u201cSendMail.ps1\u201d here and save the script on the SCCM server. Changes the following lines in the script: 1. Add you from email address in line 7 2. Add you email address in line 9 3. Add the SMTP server in line 11 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4],"tags":[21],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-sccm","tag-osdsccmemail"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=85"}],"version-history":[{"count":0,"href":"https:\/\/rolig.dk\/index.php?rest_route=\/wp\/v2\/posts\/85\/revisions"}],"wp:attachment":[{"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rolig.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}