1,978 questions
Hi @Marvin ,
Yes, you can use Powershell to set the StartDateTime and EndDateTime.
Example:
$schedule = New-Object Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule
$schedule.Type = "Once"
$schedule.StartDateTime = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
$schedule.endDateTime = "2020-07-25T20:49:11.770Z"
This is covered in the PowerShell for Azure AD roles in Privileged Identity Management guide. I couldn't find an official example that shows how to do this in bulk, but there's a blog post with an example of this here.
Let me know if this helps!