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

PowerTip: Displaying Only the Current Year in PowerShell

$
0
0

Summary: Learn how to display only the current year.

Hey, Scripting Guy! QuestionHow can I use Windows PowerShell to display only the current year?

Hey, Scripting Guy! Answer

  1. get-date -Format yyyy

  2. get-date –format yy

  3. get-date –f yyyy

  4. (Get-Date).year

  5. Get-Date -UFormat %Y

  6. Get-Date -UFormat %


Viewing all articles
Browse latest Browse all 3333

Trending Articles



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