Avatar of Terellion
Terellion
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Checking if User Folder Exists, if not email

Hi guys! Spent ages looking online and not found anything concrete, basically we have an active directory environment with different OU's for each sites and within each site has users in.

We have a data server with a folder for each user on (NTname format) for example test1, test2, test3 all separate folders.

I'd like to report on if a user in a particular OU has a folder on the data server or not, if it doesn't then to email advising of this. Hope this makes sense! I have a funny feeling it would be something like Get-ADUSer "Test1" and then to Test-Path if a folder exists (\\server1\users\test1"). if it doesn't exist then to email.

Thanks so much!
PowershellActive Directory

Avatar of undefined
Last Comment
Terellion

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
footech

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Terellion

ASKER
That is absolutely fantastic. Precisely what I needed! THANK YOU SO MUCH :)
Your help has saved me hundreds of hours of internet surfing.
fblack61