{"id":17714,"date":"2007-05-19T13:58:12","date_gmt":"2007-05-19T21:58:12","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/powershell\/?p=17714"},"modified":"2019-05-16T13:59:22","modified_gmt":"2019-05-16T21:59:22","slug":"time-stamping-log-files","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/time-stamping-log-files\/","title":{"rendered":"Time Stamping Log Files"},"content":{"rendered":"<p>Per Ostergaard has an interesting blog entry HERE where he discusses the pros\/cons of various options for date\/time formatting for time stamping log files.\nHe concludes the following worked best for him:\n&#8220;$(Get-Date \u2013f o) Start logging&#8221;\nLet&#8217;s see what that gives us:\n[0]PS> &#8220;$(Get-Date -f o) Start logging&#8221;\n2007-05-19T12:20:18.2343750-07:00 Start logging\nThat is a little chewy but once you get what it is doing, it is pretty cool. Check our Per&#8217;s blog for the details. You can use this LINK to see all of Per&#8217;s PowerShell blogs.\nJeffrey Snover [MSFT]\nWindows Management Partner Architect\nVisit the Windows PowerShell Team blog at: http:\/\/blogs.msdn.com\/PowerShell\nVisit the Windows PowerShell ScriptCenter at: http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Per Ostergaard has an interesting blog entry HERE where he discusses the pros\/cons of various options for date\/time formatting for time stamping log files. He concludes the following worked best for him: &#8220;$(Get-Date \u2013f o) Start logging&#8221; Let&#8217;s see what that gives us: [0]PS> &#8220;$(Get-Date -f o) Start logging&#8221; 2007-05-19T12:20:18.2343750-07:00 Start logging That is a [&hellip;]<\/p>\n","protected":false},"author":685,"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-17714","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>Per Ostergaard has an interesting blog entry HERE where he discusses the pros\/cons of various options for date\/time formatting for time stamping log files. He concludes the following worked best for him: &#8220;$(Get-Date \u2013f o) Start logging&#8221; Let&#8217;s see what that gives us: [0]PS> &#8220;$(Get-Date -f o) Start logging&#8221; 2007-05-19T12:20:18.2343750-07:00 Start logging That is a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17714","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\/685"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=17714"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17714\/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=17714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=17714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=17714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}