Solved

Issue creating home folders using a vbscript

Posted on 2011-09-21
1
215 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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

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…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

729 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