Most Users in our domain have a phone numbers in the following format,
+52.5558777777
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.
Excel is made to calculate with numbers. So it interprets numbers with the leading plus sign as positive numbers. When you open your CSV file in another program like notepad or VSCode you will see the plus sign. What for do you export the AD user? If you really need to display it in Excel you would need to insert an apostrophe ' in front of the plus sign.
But that would affect a further step if you use this CSV to re-import it to the AD.
Could you please format your code as code using code tag button (“PRE”)? Thanks.
I then can open it in Excel but before I import, I change the columns to “text” instead of integer. Better than what I had before but I wish there was something where I did not have to go through such hoops.