Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Converting VBScript's Now Function


Windows PowerShell


Definition: Returns the current date and time according to the setting of your computer's system date and time.

Now

If you’re looking for easy one then you came to the right place: assigning the current date and time to a variable is no more difficult than using the Get-Date Cmdlet. For example:



$a = get-date

When you run this command and then echo back the value of $a you should get something similar to the following:



Tuesday, September 05, 2006 10:24:04 AM


Return to the VBScript to Windows PowerShell home page

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.