{"id":4462,"date":"2022-11-28T11:38:44","date_gmt":"2022-11-28T19:38:44","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=4462"},"modified":"2022-11-28T11:38:46","modified_gmt":"2022-11-28T19:38:46","slug":"how-to-fix-powershell-script-wont-execute-as-a-windows-scheduled-task","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=4462","title":{"rendered":"How to Fix PowerShell Script Won&#8217;t Execute as a Windows Scheduled Task"},"content":{"rendered":"\n<p><strong>Issue like below:<\/strong><\/p>\n\n\n\n<p>I have a PowerShell script (that works). In Windows Task Scheduler I created a new task to execute\u00a0<code>\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\"<\/code>, passing the argument as my PS1 script. When the task runs I get a Last Run Result of\u00a0<code>0x1<\/code>.<\/p>\n\n\n\n<p>I updated my script to write to a log file when the script opens and that isn&#8217;t happening. It&#8217;s almost like the task can&#8217;t even open Powershell.exe.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Solutions<\/strong><a href=\"https:\/\/stackoverflow.com\/posts\/25172234\/timeline\"><\/a><\/p>\n\n\n\n<p>If the problem you&#8217;re having is with Execution Policy, then you can also set the execution policy of a specific invocation of PowerShell. This is what I usually do when executing PowerShell through a scheduled task:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>powershell.exe -NoProfile -NoLogo -NonInteractive -ExecutionPolicy Bypass -File \\\\path\\to\\script.ps1\n\nIf the problem you're having is with Execution Policy, then you can also set the execution policy of a specific invocation of PowerShell. This is what I usually do when executing PowerShell through a scheduled task:\r\n\r\npowershell.exe -NoProfile -NoLogo -NonInteractive -ExecutionPolicy Bypass -File \\\\path\\to\\script.ps1\r\nWhy?\r\n-NoProfile\r\nThis ensures that you don't rely on anything in the user's PowerShell profile, and avoids the overhead of executing that additional code.\r\n\r\n-NoLogo\r\nThis mostly doesn't matter; maybe it does if you're capturing the output of your script. Mostly it makes me feel better.\r\n\r\n-NonInteractive\r\nEnsures that your task won't wait indefinitely if something in your script unexpectedly prompts the user. With this switch, the script will just exit instead; at least you'll have an error code instead of a hanging script.\r\n\r\n-ExecutionPolicy Bypass\r\nYou can use Unrestricted here or whichever execution policy you like. This is probably the one you need the most.\r\n\r\nWhy I prefer setting Execution Policy this way:\r\nBecause I don't want the task to depend on a global non-default setting that you may have other reasons to change in the future. If some other process depends on a different execution policy, then it's not at odds with your task this way.\r\n\r\nPlus it's always nice not to have to change the defaults. Less to remember\/document\/test.<\/code><\/pre>\n\n\n\n<p><strong>Below, please see a example.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"478\" height=\"399\" src=\"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/11\/image-1.png\" alt=\"\" class=\"wp-image-4464\" srcset=\"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/11\/image-1.png 478w, https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/11\/image-1-300x250.png 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><figcaption>Task &#8211; General tabl<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"318\" src=\"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/11\/image-2-1024x318.png\" alt=\"\" class=\"wp-image-4465\" srcset=\"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/11\/image-2-1024x318.png 1024w, https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/11\/image-2-300x93.png 300w, https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/11\/image-2-768x239.png 768w, https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/11\/image-2.png 1210w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>Task &#8211; Actions tab<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Issue like below: I have a PowerShell script (that works). In Windows Task Scheduler I created a new task to execute\u00a0&#8220;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe&#8221;, passing the argument as my PS1 script. When the task runs I get a Last Run Result of\u00a00x1. I updated my script to write to a log file when the script opens and that <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=4462\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10,15],"tags":[1403,1404],"class_list":["post-4462","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-windows-servers","tag-powershell-script-wont-execute-as-a-windows-scheduled-task","tag-powershell-script-wont-execute-as-scheduled-task"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"Issue like below: I have a PowerShell script (that works). In Windows Task Scheduler I created a new task to execute &quot;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe&quot;, passing the argument as my PS1 script. When the task runs I get a Last Run Result of 0x1. I updated my script to write to a log file when the script opens and that\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Summa Lai\"\/>\n\t<meta name=\"keywords\" content=\"powershell script won&#039;t execute as a windows scheduled task,powershell script won&#039;t execute as scheduled task,microsoft family,windows servers\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/SUMMALAI.COM\/?p=4462\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#article\",\"name\":\"How to Fix PowerShell Script Won\\u2019t Execute as a Windows Scheduled Task | Summa Lai\",\"headline\":\"How to Fix PowerShell Script Won&#8217;t Execute as a Windows Scheduled Task\",\"author\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/wp-content\\\/uploads\\\/2022\\\/11\\\/image-1.png\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462\\\/#articleImage\",\"width\":478,\"height\":399},\"datePublished\":\"2022-11-28T11:38:44-08:00\",\"dateModified\":\"2022-11-28T11:38:46-08:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#webpage\"},\"articleSection\":\"Microsoft Family, Windows Servers, PowerShell Script Won&#039;t Execute as a Windows Scheduled Task, PowerShell Script Won&#039;t Execute as Scheduled Task\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/SUMMALAI.COM\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10#listItem\",\"name\":\"Microsoft Family\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10#listItem\",\"position\":2,\"name\":\"Microsoft Family\",\"item\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=15#listItem\",\"name\":\"Windows Servers\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=15#listItem\",\"position\":3,\"name\":\"Windows Servers\",\"item\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=15\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#listItem\",\"name\":\"How to Fix PowerShell Script Won&#8217;t Execute as a Windows Scheduled Task\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=10#listItem\",\"name\":\"Microsoft Family\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#listItem\",\"position\":4,\"name\":\"How to Fix PowerShell Script Won&#8217;t Execute as a Windows Scheduled Task\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?cat=15#listItem\",\"name\":\"Windows Servers\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#person\",\"name\":\"sladmin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#personImage\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Summa_Logo-150x150.png\",\"width\":96,\"height\":96,\"caption\":\"sladmin\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2\",\"name\":\"Summa Lai\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#authorImage\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/Summa_Logo-150x150.png\",\"width\":96,\"height\":96,\"caption\":\"Summa Lai\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#webpage\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462\",\"name\":\"How to Fix PowerShell Script Won\\u2019t Execute as a Windows Scheduled Task | Summa Lai\",\"description\":\"Issue like below: I have a PowerShell script (that works). In Windows Task Scheduler I created a new task to execute \\\"C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe\\\", passing the argument as my PS1 script. When the task runs I get a Last Run Result of 0x1. I updated my script to write to a log file when the script opens and that\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?p=4462#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/?author=2#author\"},\"datePublished\":\"2022-11-28T11:38:44-08:00\",\"dateModified\":\"2022-11-28T11:38:46-08:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#website\",\"url\":\"https:\\\/\\\/SUMMALAI.COM\\\/\",\"name\":\"Summa Lai\",\"description\":\"Never Stop Learning, Building a Little Wiki...\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/SUMMALAI.COM\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Fix PowerShell Script Won\u2019t Execute as a Windows Scheduled Task | Summa Lai","description":"Issue like below: I have a PowerShell script (that works). In Windows Task Scheduler I created a new task to execute \"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\", passing the argument as my PS1 script. When the task runs I get a Last Run Result of 0x1. I updated my script to write to a log file when the script opens and that","canonical_url":"https:\/\/SUMMALAI.COM\/?p=4462","robots":"max-image-preview:large","keywords":"powershell script won&#039;t execute as a windows scheduled task,powershell script won&#039;t execute as scheduled task,microsoft family,windows servers","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/SUMMALAI.COM\/?p=4462#article","name":"How to Fix PowerShell Script Won\u2019t Execute as a Windows Scheduled Task | Summa Lai","headline":"How to Fix PowerShell Script Won&#8217;t Execute as a Windows Scheduled Task","author":{"@id":"https:\/\/SUMMALAI.COM\/?author=2#author"},"publisher":{"@id":"https:\/\/SUMMALAI.COM\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2022\/11\/image-1.png","@id":"https:\/\/SUMMALAI.COM\/?p=4462\/#articleImage","width":478,"height":399},"datePublished":"2022-11-28T11:38:44-08:00","dateModified":"2022-11-28T11:38:46-08:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/SUMMALAI.COM\/?p=4462#webpage"},"isPartOf":{"@id":"https:\/\/SUMMALAI.COM\/?p=4462#webpage"},"articleSection":"Microsoft Family, Windows Servers, PowerShell Script Won&#039;t Execute as a Windows Scheduled Task, PowerShell Script Won&#039;t Execute as Scheduled Task"},{"@type":"BreadcrumbList","@id":"https:\/\/SUMMALAI.COM\/?p=4462#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM#listItem","position":1,"name":"Home","item":"https:\/\/SUMMALAI.COM","nextItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=10#listItem","name":"Microsoft Family"}},{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=10#listItem","position":2,"name":"Microsoft Family","item":"https:\/\/SUMMALAI.COM\/?cat=10","nextItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=15#listItem","name":"Windows Servers"},"previousItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=15#listItem","position":3,"name":"Windows Servers","item":"https:\/\/SUMMALAI.COM\/?cat=15","nextItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?p=4462#listItem","name":"How to Fix PowerShell Script Won&#8217;t Execute as a Windows Scheduled Task"},"previousItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=10#listItem","name":"Microsoft Family"}},{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?p=4462#listItem","position":4,"name":"How to Fix PowerShell Script Won&#8217;t Execute as a Windows Scheduled Task","previousItem":{"@type":"ListItem","@id":"https:\/\/SUMMALAI.COM\/?cat=15#listItem","name":"Windows Servers"}}]},{"@type":"Person","@id":"https:\/\/SUMMALAI.COM\/#person","name":"sladmin","image":{"@type":"ImageObject","@id":"https:\/\/SUMMALAI.COM\/?p=4462#personImage","url":"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2020\/05\/Summa_Logo-150x150.png","width":96,"height":96,"caption":"sladmin"}},{"@type":"Person","@id":"https:\/\/SUMMALAI.COM\/?author=2#author","url":"https:\/\/SUMMALAI.COM\/?author=2","name":"Summa Lai","image":{"@type":"ImageObject","@id":"https:\/\/SUMMALAI.COM\/?p=4462#authorImage","url":"https:\/\/SUMMALAI.COM\/wp-content\/uploads\/2020\/05\/Summa_Logo-150x150.png","width":96,"height":96,"caption":"Summa Lai"}},{"@type":"WebPage","@id":"https:\/\/SUMMALAI.COM\/?p=4462#webpage","url":"https:\/\/SUMMALAI.COM\/?p=4462","name":"How to Fix PowerShell Script Won\u2019t Execute as a Windows Scheduled Task | Summa Lai","description":"Issue like below: I have a PowerShell script (that works). In Windows Task Scheduler I created a new task to execute \"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\", passing the argument as my PS1 script. When the task runs I get a Last Run Result of 0x1. I updated my script to write to a log file when the script opens and that","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/SUMMALAI.COM\/#website"},"breadcrumb":{"@id":"https:\/\/SUMMALAI.COM\/?p=4462#breadcrumblist"},"author":{"@id":"https:\/\/SUMMALAI.COM\/?author=2#author"},"creator":{"@id":"https:\/\/SUMMALAI.COM\/?author=2#author"},"datePublished":"2022-11-28T11:38:44-08:00","dateModified":"2022-11-28T11:38:46-08:00"},{"@type":"WebSite","@id":"https:\/\/SUMMALAI.COM\/#website","url":"https:\/\/SUMMALAI.COM\/","name":"Summa Lai","description":"Never Stop Learning, Building a Little Wiki...","inLanguage":"en-US","publisher":{"@id":"https:\/\/SUMMALAI.COM\/#person"}}]}},"aioseo_meta_data":{"post_id":"4462","title":null,"description":null,"keywords":[],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"#aioseo-article-65a0cf425f16b","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-11-28 19:15:39","updated":"2024-01-12 05:33:54","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/SUMMALAI.COM\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/SUMMALAI.COM\/?cat=10\" title=\"Microsoft Family\">Microsoft Family<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/SUMMALAI.COM\/?cat=15\" title=\"Windows Servers\">Windows Servers<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Fix PowerShell Script Won\u2019t Execute as a Windows Scheduled Task\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/SUMMALAI.COM"},{"label":"Microsoft Family","link":"https:\/\/SUMMALAI.COM\/?cat=10"},{"label":"Windows Servers","link":"https:\/\/SUMMALAI.COM\/?cat=15"},{"label":"How to Fix PowerShell Script Won&#8217;t Execute as a Windows Scheduled Task","link":"https:\/\/SUMMALAI.COM\/?p=4462"}],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4462"}],"version-history":[{"count":2,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4462\/revisions"}],"predecessor-version":[{"id":4466,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4462\/revisions\/4466"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}