Most Users in our domain have a phone numbers in the following format,
It has the ‘+’ sign followed by the country code, a period and then the rest of the number. I can see this when I perform a Get-ADUser.
When I take the user and pipe it to export-csv, the format of the phone appears as:
52.5558777777 (no plus sign)
or (with a different user who is in AD as +390542677777)
3.90543E+11 in the row in Excel but when I select the cell in Excel, it shows up as 390542677777
I simply want it to show up verbatim as it exists in AD. How do I amend the following so that it reports telephone numbers with the plus sign, no exponential, i.e., as it is in AD.
Get-Aduser SampleUserXY -Properties officephone,telephonenumber,ipPhone,fax,employeenumber,extensionattribute4 -Credential $credINT | Select employeenumber,“officephone”,`
“telephonenumber”,ipPhone,fax,extensionattribute4 | Export-CSv -Path “C:\Users\admin\Documents\AD Reports\Telephone\Test2.csv” -NoTypeInformation -Encoding UTF8
Note: The quotes around telephonenumber were an attempt to correct it. I get the same results without the quotes.