Welcome › Forums › General PowerShell Q&A › [timeSpan]::maxvalue return error. How to do RepetitionDuration with max value
New-JobTrigger -RepetitionInterval (New-TimeSpan -Hours 2) -RepetitionDuration ([timeSpan]::maxvalue) -At (get-date) -Once
Am I wrong or do you want to run this job only once? If so why using a repetition interval at all? If not you may elaborate a little more what you’re trying to do.
I start with power shell now, and still learning, I will create a new question. thanks.
NO … no new question … just explain what you problem is please.