Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trimmed Time value breaks Enable-DCEntraIDPIMRoles -useMaximumTimeAllowed argument #50

Open
mallengoebel opened this issue Sep 21, 2024 · 1 comment

Comments

@mallengoebel
Copy link

Error Message when using -UseMaximumTimeAllowed. Correct formatting broken error.

New-MgRoleManagementDirectoryRoleAssignmentScheduleRequest_Create: The Active duration is too short. Miniumum Required is 5 minutes. Status: 400 (BadRequest) ErrorCode:
ActiveDurationTooShort Date: 2024-09-21T22:53:02 Headers: Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000 request-id :
client-request-id : :
{"ServerInfo":{}} Date : Sat, 21
Sep 2024 22:53:01 GMT
Enable-DCEntraIDPIMRole: C:\Users<string>\Downloads\enable-PIM-roles-Graph 3.ps1:45
Line |
45 | Enable-DCEntraIDPIMRole -RolesToActivate $Roles -Reason $Reason -UseM …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot convert argument "value", with value: "1230M", for "AddHours" to type "System.Double": "Cannot convert
| value "1230M" to type "System.Double". Error: "The input string '1230M' was not in a correct format.""

@mallengoebel
Copy link
Author

mallengoebel commented Sep 21, 2024

Powershell 7.4
Graph 2.23.0
DCToolBox 2.0.21
Expected value format is 00H00M. The passed value format is 0000M.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant