Datetime parameter unusable in simple automation runbook

Buch, Tamara 16 Reputation points
2023-03-30T17:14:38.4133333+00:00

I have the most simple runbook imaginable. It takes the parameter [Datetime]$DateNotified and it does a write-output of $DateNotified. Instead of printing the date I get this error: Cannot process argument transformation on parameter 'DateNotified'. Cannot convert value "/Date(1678838400000)/" to type "System.DateTime". Error: "String '/Date(1678838400000)/' was not recognized as a valid DateTime."

Any ideas why? I just want users to be able to select a date when running a runbook, but anything I do with a [datetime] param throws an error. See screenshots.

azure2

azure1

User's image

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,279 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.