{"id":770,"date":"2014-08-27T11:59:00","date_gmt":"2014-08-27T11:59:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2014\/08\/27\/powertip-use-powershell-to-change-system-time\/"},"modified":"2014-08-27T11:59:00","modified_gmt":"2014-08-27T11:59:00","slug":"powertip-use-powershell-to-change-system-time","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-use-powershell-to-change-system-time\/","title":{"rendered":"PowerTip: Use PowerShell to Change System Time"},"content":{"rendered":"<p><b style=\"font-size:12px\">Summary<\/b><span style=\"font-size:12px\">: Learn how to use Windows PowerShell to change the system time.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Question\">&nbsp;The clock on my computer (running Windows&nbsp;8.1) is 30 minutes slow. How can I use Windows PowerShell&nbsp;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to move the system time up 30 minutes?<\/p>\n<p style=\"margin-left:30px\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" alt=\"Hey, Scripting Guy! Answer\">&nbsp;Use the&nbsp;<b>Set-Date<\/b>&nbsp;cmdlet, create a&nbsp;<b>TimeSpan<\/b>&nbsp;object equal to 30 minutes, and supply it to <br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the&nbsp;<b>&ndash;adjust<\/b>&nbsp;parameter:<\/p>\n<p style=\"margin-left:120px\">Set-Date -Adjust (New-TimeSpan -Minutes 30)<\/p>\n<p style=\"margin-left:90px\">To alter the clock back 30 minutes, create a negative&nbsp;<b>TimeSpan<\/b>, for example:<\/p>\n<p style=\"margin-left:120px\">Set-Date -Adjust (New-TimeSpan -Minutes -30)<\/p>\n<p style=\"margin-left:90px\"><b>Note&nbsp;<\/b>&nbsp;This cmdlet requires credentials to set the time. One way to get this privilege is to open <br \/>Windows PowerShell as an administrator.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to use Windows PowerShell to change the system time. &nbsp;The clock on my computer (running Windows&nbsp;8.1) is 30 minutes slow. How can I use Windows PowerShell&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to move the system time up 30 minutes? &nbsp;Use the&nbsp;Set-Date&nbsp;cmdlet, create a&nbsp;TimeSpan&nbsp;object equal to 30 minutes, and supply it to &nbsp; [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[356,3,45],"class_list":["post-770","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-powertip","tag-scripting-guy","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to use Windows PowerShell to change the system time. &nbsp;The clock on my computer (running Windows&nbsp;8.1) is 30 minutes slow. How can I use Windows PowerShell&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; to move the system time up 30 minutes? &nbsp;Use the&nbsp;Set-Date&nbsp;cmdlet, create a&nbsp;TimeSpan&nbsp;object equal to 30 minutes, and supply it to &nbsp; [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=770"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/770\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}