O365
2 TopicsEnable Admin roles in O365 - Enable-PrivilegedRoleAssignment
Hi, I'm using Powershell to activate Admin roles in O365. Since a week the command below gives an error. Does anyone have an idea why it isn't working anymore? Command: Connect-PimService –UserName "" $roleAssignmentsa = Get-PrivilegedRoleAssignment | Where {$_.RoleName -eq "SharePoint Service Administrator"} Enable-PrivilegedRoleAssignment -TicketNumber "" -TicketSystem "" –Reason “” –Duration 8 –RoleAssignment $roleAssignmentsa Error: Enable-PrivilegedRoleAssignment : An error occurred while processing this request. At line:1 char:1 + Enable-PrivilegedRoleAssignment -TicketNumber "" -TicketSystem "" –Re ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Enable-PrivilegedRoleAssignment], DataServiceQueryException + FullyQualifiedErrorId : Microsoft.OData.Client.DataServiceQueryException,Microsoft.Azure.ActiveDirectory.PIM.PSModule.Cmdlets.EnablePrivilegedRoleAssignment6.3KViews0likes6CommentsRun PowerShell on the web
All, I am using Office 365. Some tasks require, or are easier to do using PowerShell. The only issue I have is that since I have 2FA, I need to sign in again and again, sometimes 10 or more times per day. In the browser I am signed in to the admin center. Is there any way to run PS commands from one of the admin centers?1.2KViews0likes3Comments