Forum Discussion
Unable to Execute Exchange Online PowerShell Commands for Role Management
I'm using online Microsoft Exchange PowerShell, trying to assign some roles via the command line as i was unable to do that via the Exchange interface, i kept getting unable to save changes error.
This is what I tried:
PS /home/entvita> Import-Module ExchangeOnlineManagement
PS /home/entvita> New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "mailto:email address removed for privacy reasonsentvita.de"
New-ManagementRoleAssignment: The term 'New-ManagementRoleAssignment' is not recognized as the name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Also tried to check for RoleGroup:
PS /home/entvita> Get-RoleGroupMember "Organization Management"
Get-RoleGroupMember: The term 'Get-RoleGroupMember' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
- Well, you actually need to connect to Exchange Online first. I.e. run the Connect-ExchangeOnline cmdlet and provide the credentials of an admin user. More details here: https://learn.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps
1 Reply
- Well, you actually need to connect to Exchange Online first. I.e. run the Connect-ExchangeOnline cmdlet and provide the credentials of an admin user. More details here: https://learn.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-powershell?view=exchange-ps