Powershell script with certain information

Brass Contributor

Hello everyone, 

I am trying to extract some information from PS in my Office 365 tenant and I'd like a little help

 

Can anyone give me the proper syntax to do the following

 

1) UPN or username whichever is easier or more compatible with the rest of the output

2) Their last logon 

3) Do they have an kind of license assigned to them

4) Is it a shared mailbox or not

5) Is MFA enabled or not on their account

6) Export in readable form to a CSV or XLS (I normally do my exports in CSV)

 

Is this something that is achievable from one script?

Thank you very much!

1 Reply
Hello,
Is this kind of script possible?
Thanks!