Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 1.0 » New-Timespan

New-Timespan - Powershell 1.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

New-Timespan

Description
Create a timespan object

Usage


Options


Example(s)
Create a TimeSpan object of duration 1 hour plus 90 minutes and store it in a variable named $mytspan:

PS C:\>$mytspan = new-timespan -hour 1 -minute 90

Create a new TimeSpan object for Jan 1970 - Jan 1971:

PS C:\>$mytspan = new-timespan (get-date -year 1970 -month 01) (get-date -year 1971 -month 01)