While it's still unclear if support for [Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule]
will be added for PowerShell 7, an alternative is to use the Microsoft Graph PowerShell SDK module. This module uses [MicrosoftGraphUnifiedRoleAssignmentScheduleRequest]
instead (documentation), which does work within PowerShell 7. Additionally, consider using Justin Grote's JAz.PIM module (Github, PowerShell Gallery) instead for activating Azure AD role and resource PIM requests from PowerShell.
Support for AzureADMSPrivilegedSchedule in PowerShell 7 with AzureADPreview module?

Brian Kaiser
1
Reputation point
Is there support for the Microsoft.Open.MSGraph.Model.AzureADMSPrivilegedSchedule .NET class in PowerShell 6/7? When I try to create a schedule object when using the Open-AzureADMSPrivilegedRoleAssignmentRequest
cmdlet with the latest version of the AzureADPreview module in PowerShell 7.2.1, I get an error that the type could not be found.
Using a schedule object is the only documented way I've seen to using this cmdlet: https://learn.microsoft.com/en-us/powershell/module/azuread/open-azureadmsprivilegedroleassignmentrequest?view=azureadps-2.0-preview#example-1
1 answer
Sort by: Most helpful
-
Brian Kaiser 1 Reputation point
2022-07-11T16:53:02.607+00:00