{"id":4071,"date":"2009-05-06T23:30:53","date_gmt":"2009-05-06T23:30:53","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2009\/05\/06\/fun-with-alerts-a\/"},"modified":"2019-02-18T13:12:39","modified_gmt":"2019-02-18T20:12:39","slug":"fun-with-alerts-a","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/fun-with-alerts-a\/","title":{"rendered":"Fun With Alerts (&#8220;`a&#8221;)"},"content":{"rendered":"<p>I just decided to restart Outlook to see if that made some weirdness I was experiencing go away.&#160; As you may or may not know, the Outlook process often is running for quite a bit after the Outlook window goes away.&#160; As such, you really don\u2019t want to start another instance of Outlook until the first version is done.&#160; <\/p>\n<p>In V2, we now have the WAIT-PROCESS command so what I wanted to do was:<\/p>\n<blockquote>\n<p><font color=\"#0000ff\" size=\"2\" face=\"Courier New\">PS&gt; Wait-Process Outlook; Outlook<\/font><\/p>\n<\/blockquote>\n<p>The problem with that is that Outlook is not in the Path so it doesn\u2019t work.&#160; I could go figure out how to do this but I didn\u2019t want to spend the time right now so instead I did the following:<\/p>\n<blockquote>\n<p><font color=\"#0000ff\" size=\"2\" face=\"Courier New\">PS&gt; Wait-Process Outlook; \u201c`a\u201d<\/font><\/p>\n<\/blockquote>\n<p>What that does is wait for the process to end and then emit an \u201cAlert\u201d (same as BEEP).&#160; I waited for the alert and then knew it was safe to restart Outlook.&#160; Anyway \u2013 I don\u2019t know how many people know about Alert so I thought I would blog it.&#160; <\/p>\n<p>If you read the help on About_Quoting_Rules, you see a list of&#160; the following special characters are recognized by Windows PowerShell: <\/p>\n<p>&#160;&#160;&#160; `0&#160;&#160;&#160; Null   <br \/>&#160;&#160;&#160; `a&#160;&#160;&#160; Alert    <br \/>&#160;&#160;&#160; `b&#160;&#160;&#160; Backspace    <br \/>&#160;&#160;&#160; `f&#160;&#160;&#160; Form feed    <br \/>&#160;&#160;&#160; `n&#160;&#160;&#160; New line    <br \/>&#160;&#160;&#160; `r&#160;&#160;&#160; Carriage return    <br \/>&#160;&#160;&#160; `t&#160;&#160;&#160; Horizontal tab    <br \/>&#160;&#160;&#160; `v&#160;&#160;&#160; Vertical tab <\/p>\n<p>&#160;<\/p>\n<p>Experiment!&#160; Enjoy!&#160; Engage! <\/p>\n<p>Jeffrey Snover [MSFT]   <br \/>Distinguished Engineer    <br \/>Visit the Windows PowerShell Team blog at:&#160;&#160;&#160; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a>    <br \/>Visit the Windows PowerShell ScriptCenter at:&#160; <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx\">http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just decided to restart Outlook to see if that made some weirdness I was experiencing go away.&#160; As you may or may not know, the Outlook process often is running for quite a bit after the Outlook window goes away.&#160; As such, you really don\u2019t want to start another instance of Outlook until the [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4071","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>I just decided to restart Outlook to see if that made some weirdness I was experiencing go away.&#160; As you may or may not know, the Outlook process often is running for quite a bit after the Outlook window goes away.&#160; As such, you really don\u2019t want to start another instance of Outlook until the [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4071","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=4071"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4071\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=4071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=4071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=4071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}