Share via

Windows Power Shell Command wording

Gary Huber Admin 136 Reputation points
2022-09-01T17:18:19.743+00:00

Power Shell Command
After I sign in to power shell as admin and run my sign on info I then use this command: It works but does not give me Job Title information. The column is there in the CSV download but the data is not. Should I be using a different command?

Get-User -ResultSize Unlimited | select FirstName,LastName,JobTitle,Manager,Department,Company,HomePhone,MobilePhone,WindowsEmailAddress,StreetAddress,Office,City,PostalCode | export-csv c:\exportedcontacts.csv

Windows for business | Windows Server | User experience | PowerShell

Answer accepted by question author

Dillon Silzer 60,931 Reputation points
2022-09-01T17:38:09.743+00:00

Hi @Gary Huber Admin

Instead of JobTitle, try Title

--------------------------------------

If this is helpful please accept answer.

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Gary Huber Admin 136 Reputation points
    2022-09-02T15:50:28.983+00:00

    This is my entire Powershell command:

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

    Set-ExecutionPolicy RemoteSigned

    Install-Module -Name ExchangeOnlineManagement

    Import-Module ExchangeOnlineManagement

    Connect-exchangeonline

    Then after the above finishes:

    Get-User -ResultSize Unlimited | select FirstName, LastName, Title, Manager, Department, Company, Phone, MobilePhone, Office, StreetAddress, City, St, PostalCode, WindowsEmailAddress | export-csv c:\exportedcontacts.csv

    Using the above the St column header does show but there is no data in the rows below it.

    Was this answer helpful?


  2. Gary Huber Admin 136 Reputation points
    2022-09-02T03:39:42.51+00:00

    Dillon, got that, worked. One more question what about State. I tried State, State/province and a few more variations of that.

    Regards,

    Gary

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.