A to Z Full Forms and Acronyms

PowerShell Scripts - on Date and Time

Nov 20, 2021 PowerShell, 7216 Views
PowerShell Scripts - on Date and Time

PowerShell Scripts - on Date and Time

PowerShell - To Get System Date

Command -  Get-Date is used to get the current date.

Get-Date

PowerShell - To Get System Time

Command -  Get-Date -DisplayHint Time is used to get the current system time

Get-Date -DisplayHint Time

PowerShell - To Set System Time

Command - set-date adjust $timeToAdd is used to set time as required.

$timeToAdd = New-TimeSpan -Minutes -60
set-date -adjust $timeToAdd

PowerShell - To Set System Date

Command - Set-Date is used to set system Date

set-date -Date (Get-Date).AddDays(1)
A to Z Full Forms and Acronyms
SUBHAM RAY

SUBHAM RAY

Subham Ray loves to share Technology through articles or sessions or even Virtual events. He is a passionate Author at TutorialsLink where he writes articles on Azure , data science, Machine Learning, and more. He is a certified Artificial Intelligence Engineer. He has delivered sessions on technology on national and international grounds.

Related Article

Cookies.

By using this website, you automatically accept that we use cookies. What for?

Understood