?
Solved

Issue creating home folders using a vbscript

Posted on 2011-09-21
1
Medium Priority
?
218 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

764 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