Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- param(
- [CmdletBinding()]
- [ValidatePattern('^(((?<days>[0-9]+)\+)?((?<hours>[0-9]{1,2}):))?(?<mins>[0-9]{1,2})$')]
- [string]$quserTimeString
- )
- $quserTimeString -match '^(((?<days>[0-9]+)\+)?((?<hours>[0-9]{1,2}):))?(?<mins>[0-9]{1,2})$' | Out-Null
- [Timespan]::new($Matches.days, $Matches.hours, $Matches.mins, 0)
Add Comment
Please, Sign In to add comment