Time Stamping Log Files

Steve Lee

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: “$(Get-Date –f o) Start logging” Let’s see what that gives us: [0]PS> “$(Get-Date -f o) Start logging” 2007-05-19T12:20:18.2343750-07:00 Start logging That is a little chewy but once you get what it is doing, it is pretty cool. Check our Per’s blog for the details. You can use this LINK to see all of Per’s PowerShell blogs. Jeffrey Snover [MSFT] Windows Management Partner Architect Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx


Discussion is closed.

Feedback usabilla icon