I am working on a script that will gather user details such as basics like the DisplayName, Description, Employee ID #, and Telephone Number.
The challenge is that I have to remove some of the phone number. I want to keep only the last 8 characters, which should (in 99% of instances) be 765-4321
Can anyone help me do this? I have to query AD using Quest as we have a Windows 2003 domain with no AD Web Services running. I can get the user details for all users in the domain, but I think I’ve got to limit this to a 1 main OU and sub-ous under that main OU, that’s the only part of the gathering data I think I need some help with. Then I think I was ok with the rest, but any help would be great. The end result is I need to send this out as an email or perhaps save it to a file share in csv format.
Thanks as always, you are all great!