{"id":255,"date":"2016-05-13T14:18:11","date_gmt":"2016-05-13T14:18:11","guid":{"rendered":"https:\/\/sysadminnightmare.com\/?p=255"},"modified":"2016-05-13T14:18:32","modified_gmt":"2016-05-13T14:18:32","slug":"powershell-errors","status":"publish","type":"post","link":"https:\/\/sysadminnightmare.com\/index.php\/2016\/05\/13\/powershell-errors\/","title":{"rendered":"Powershell Errors"},"content":{"rendered":"<p>I was tired of my co workers walking by my desk and commenting about all the &#8220;red&#8221; powershell errors scrolling up my screen. So instead of writing better code I used the simple command to put those errors in a text file instead of onscreen.<\/p>\n<p>For something like:<br \/>\n<code><br \/>\nSet-mailbox -identity $upn -DeliverToMailboxAndForward $False -ForwardingSMTPAddress $email <strong>2>> errors.txt<\/strong><br \/>\n<\/code><\/p>\n<p>using the 2>> errors.txt will put those errors in that txt file instead of scrolling up the screen.<\/p>\n<p>Next I will try to work in some error checking and be a better coder .. but for now.. that works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was tired of my co workers walking by my desk and commenting about all the &#8220;red&#8221; powershell errors scrolling up my screen. So instead of writing better code I used the simple command to put those errors in a text file instead of onscreen. For something like: Set-mailbox -identity&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/sysadminnightmare.com\/index.php\/2016\/05\/13\/powershell-errors\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2,4,7,8],"tags":[],"class_list":["post-255","post","type-post","status-publish","format-standard","hentry","category-admin","category-exchange","category-powershell-2","category-tech-tips-101"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2bgeE-47","_links":{"self":[{"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/posts\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":2,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/posts\/255\/revisions"}],"predecessor-version":[{"id":258,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/posts\/255\/revisions\/258"}],"wp:attachment":[{"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/media?parent=255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/categories?post=255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/tags?post=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}