Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Get Week of Year with PowerShell

$
0
0

Summary: Learn how to use Windows PowerShell to get the week of the year.

Hey, Scripting Guy! Question How can I use Windows PowerShell to find how many weeks are left in the current year—without doing lot of math or
           calendaring stuff?

Hey, Scripting Guy! Answer Use the Get-Date cmdlet but specify a –uformat of %V:

Get-Date -UFormat %V

Note  Please remember that UFormat strings are case sensitive, so it is capital V, not lowercase v.


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>