Work with Date & Time with PowerShell

preview_player
Показать описание
In this video we discuss Date and Time as it relates to PowerShell. Things like how to format the output, add and subtract time, use the cmdlets to edit time stamps on files, and to query the event log. All very useful foundational knowledge on your quest to become a PowerShell guru.

Cmdlets covered:
* Get -Date
* Get-EventLog
* Get-Item
* ToShortDateString
* ToLongDateString
* ToShortTimeString
* ToLongTimeString

Custom Formatting

Рекомендации по теме
Комментарии
Автор

Great video! Just wanted to add,

get-date $pig -UFormat %y

This actually returns the year, it returned 17 in the case as it was 2017 at the time. %V returns the week number, the 'v' didn't work in your video because it needs to be upper case.

keeganlee
Автор

Thanks Shane! Always a pleasure to learn from you.

franklinchaguendo
Автор

Shane, I love your demonstration style. I have struggled with PowerShell, and after watching your videos, I think it is starting to click.

michaelschultz
Автор

Shane Young.. you made my learing easier ...I started learning PowerShell by watching your video tutorial. Thanks for the clear and informative content.

krishnareddyketha
Автор

Congratulations, I'm starting with Powershell and you have the best videos and explanations I have seen about Powershell, you gave me a new approach. Good job. Thanks man!!

tiri
Автор

Amazing...You make Powershell learning more interesting.Thank you

kuldeepdeshmukh
Автор

Brilliant lesson, specially the creation time manipulation.

AshraRai
Автор

Hey Shane, as i was confused whether to opt to learn powershell or not as most of my friends has confused me that its really tough to learn after watching your series of videos i came to know its not tough, hats off to you as u made it so clear and easy to understand

syednawaz
Автор

Thanks Shane for the video. Have seen 1 & 2. Just starting with PowerShell but find it very interesting.  May have to watch them again. Thanks again!

kennethpeterson
Автор

I learn so much with your videos, thanks!

Corrado
Автор

Brilliant content. straight to the point.

DarshanaHashendra
Автор

Great, wonderfully informative...learned to do stuff which I never knew before. -Thanks! ;-)

PaulRamnora
Автор

Excellent Tutorial. I hope you'll keep on uploading more content :)

annazielinska
Автор

Awesome video Shane! Thank you so much for your great effort. I would like to ask that i got some difference in time format in my output. I have windows10 OS. Below is the example---

PS C:\Users\Ankit Singh> Get-Date

15 September 2017 11:04:19


Here Day is not present.

ANKITSINGH-qgie
Автор

Hey man... You are rocking with you videos. Great way of explanation, most important you give full justification to every topic that you have touched.

So with word topic :) Can you make a video with regx explanation (Or Point me if you have already). Thanks in Advance

DevOpsWithPankaj
Автор

Thanks for your great videos, very helpful! Can Power Shell do math beyond simple algebra? Can I do trigonometry and other more advanced math?

seanme
Автор

Hey, great set of videos, sparked an interest for Powershell... But I wonder, how come your text changes color depending on the type of input you write, while mine is always the same color? :L

Spasmaticus
Автор

Hi Shane,

could you please help me to know how to keep a date constant in powershell so that it can be execute as Subtask later

Please Help!

saiprasaddas
Автор

Hi Shane,
When I use the get-date command I get:
August 25, 2023 11:11:23 AM
Everywhere I have searched shows the default output to be
Friday August 25, 2023 11:11:23 AM
What do I have to do to change the format?
I used get-date -uformat %c but it does not change it.
Take care,

santiaguson
Автор

Hey Shane,

I am trying to compare two formatted dates. Both are technically string objects, however, I would like to compare the DIFFERENCE of the dates.

One is a Get-Date that I format to "yyyy-MM-dd hh:mm:ss"
the other is a date in that format, which I pull from a CSV file.

I would like the output to be an integer.

Can you help me out?

eiji