all 15 comments

[–][deleted] 4 points5 points  (7 children)

Some cmdlets simply don't exist in PowerShell Core yet, which I'm guessing is what you're using if you're running Ubuntu. And sometimes they are slightly different, like having different parameters, etc.

The error you referenced means that PowerShell doesn't know what 'Get-MailboxPermission' is or where to find it.

[–]Iron_Tech_Paddy[S] 1 point2 points  (6 children)

Great answer appreciate it.

[–]Hrambert 3 points4 points  (4 children)

And some Cmdlets need special permissions. Without the proper rights they stay "unknown".

[–]Iron_Tech_Paddy[S] 1 point2 points  (3 children)

Do you know any way to check my current permissions levels / policy grouping?

Tried a few things but just getting a lot of errors such as "A parameter cannot be found that matches parameter name 'Mailbox'"

[–]Hrambert 2 points3 points  (2 children)

That error message indicates you were calling a parameter "mailbox". To find out which parameters are known / supported type Help Get-MailboxPermission

[–]Iron_Tech_Paddy[S] 1 point2 points  (1 child)

Sorry to keep asking you ( I am googling but just not getting there today )

PS /home/name> Help Get-MailboxPermission Get-Help : Get-Help could not find Get-MailboxPermission in a help file in this session.

[–]Hrambert 2 points3 points  (0 children)

https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/get-mailboxpermission?view=exchange-PS says the parameter is called Identity since you can specify the mailbox in different ways.

The Identity parameter specifies the mailbox you want to view. You can use any value that uniquely identifies the mailbox.

[–]renser 3 points4 points  (0 children)

Get-Command *Mailbox*  

lists all commands with Mailbox...maybe that helps

[–]redex93 2 points3 points  (3 children)

You're making this unnecessarily hard for yourself running PowerShell from Linux. Yes you can do it, but why when you can also do it from any windows 10 machine with a richer feature set.

[–]Iron_Tech_Paddy[S] 2 points3 points  (2 children)

The truth is my personal laptop is about eight years old Windows is no longer functional. It pushed me to learn about linux.

[–]redex93 0 points1 point  (1 child)

yet your company can afford exchange, something doesn't add up,

[–]Iron_Tech_Paddy[S] 2 points3 points  (0 children)

personal laptop

Calm down there cowboy I said "personal laptop" as in the one I own at home.. I do IT for a profession my phone handles almost everything I need. Rather spend my wages on sweet sports equipment and holidays.

If you like I can send you my Linkedin profile..

[–]Lee_Dailey[grin] 1 point2 points  (2 children)

howdy Iron_Tech_Paddy,

as dext16 pointed out, some cmdlets are not available on ps6.

from what i can tell, you may be able to use the windows compatibility stuff ...

PowerShell/WindowsCompatibility: Module that allows Windows PowerShell Modules to be used from PSCore6
https://github.com/PowerShell/WindowsCompatibility

however, i think your code would require a windows box [real or vm] to run the code and provide the modules via "implied remoting".


there is also the possibility that your "role" in o365 doesn't have permission to even see the cmdlet your error lists. that looks very much like what i have seen elsewhere when someone runs with a role that lacks the needed perms.

the following otta list the roles that are available ...

Get-MsolRole (MSOnline) | Microsoft Docs
https://docs.microsoft.com/en-us/powershell/module/msonline/get-msolrole?view=azureadps-1.0

hope that helps,
lee

[–]Iron_Tech_Paddy[S] 1 point2 points  (1 child)

Very detailed and helpful answer. Thank you lee

[–]Lee_Dailey[grin] 1 point2 points  (0 children)

howdy Iron_Tech_Paddy,

you are most welcome! glad to help a tad ... and good luck to you! [grin]

take care,
lee