custom powershell script not creating folder

custom powershell script not creating folder

Hi,

I'm using a custom powershell script to create home folders for new users. we have a lot of OUs and different shares for home drives so i'm using powershell to get the right share based on where the AD user is located. That is working fine but when i get the script tries to run New-Item $HomeDir -type directory -Force nothing is created.

I've tried running the script manually from both the server and my laptop and it does create the folder, its just not working when i try to run it as a custom script.

Any thoughts?

                New to ADSelfService Plus?