Solved

Issue creating home folders using a vbscript

Posted on 2011-09-21
1
209 Views
Last Modified: 2012-06-22
we have a vbscript at the moment that will create an account in AD, which it will then add the account to a number of groups and then create a home folder on a server  share and set the permissions.  All of this seems to be working fine ,but...

A number of times although it is creating the homefolder and looks as if it is adding the correct permissions for the user.  However if you try and save any work it comes up with an accessed denied error.  If we then  reapply the permissions it seems to work.

We are using CALCS to do this should we be using XCALCS long term I would like to use powershell but is that possible?
0
Comment
Question by:WNottsC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 36578006
You could certainly try XCacls.vbs
Here's how I'd use it:

sHomeDir = "\\server\users\jsmith"
sUser = "domain\jsmith"
strCommand = "%COMSPEC% /c cscript.exe %systemroot%\System32\xcacls.vbs " & sHomeDir & " /E /T /G " & sUser & ":F"
objShell.Run strCommand, 1, True

Open in new window


Regards,

Rob.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question