Powershell script with certain information

%3CLINGO-SUB%20id%3D%22lingo-sub-3402083%22%20slang%3D%22en-US%22%3EPowershell%20script%20with%20certain%20information%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3402083%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20everyone%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20extract%20some%20information%20from%20PS%20in%20my%20Office%20365%20tenant%20and%20I'd%20like%20a%20little%20help%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anyone%20give%20me%20the%20proper%20syntax%20to%20do%20the%20following%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20UPN%20or%20username%20whichever%20is%20easier%20or%20more%20compatible%20with%20the%20rest%20of%20the%20output%3C%2FP%3E%3CP%3E2)%20Their%20last%20logon%26nbsp%3B%3C%2FP%3E%3CP%3E3)%20Do%20they%20have%20an%20kind%20of%20license%20assigned%20to%20them%3C%2FP%3E%3CP%3E4)%20Is%20it%20a%20shared%20mailbox%20or%20not%3C%2FP%3E%3CP%3E5)%20Is%20MFA%20enabled%20or%20not%20on%20their%20account%3C%2FP%3E%3CP%3E6)%20Export%20in%20readable%20form%20to%20a%20CSV%20or%20XLS%20(I%20normally%20do%20my%20exports%20in%20CSV)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20something%20that%20is%20achievable%20from%20one%20script%3F%3C%2FP%3E%3CP%3EThank%20you%20very%20much!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3402083%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3427822%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20script%20with%20certain%20information%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3427822%22%20slang%3D%22en-US%22%3EHello%2C%3CBR%20%2F%3EIs%20this%20kind%20of%20script%20possible%3F%3CBR%20%2F%3EThanks!%3C%2FLINGO-BODY%3E
Occasional 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!