Solved

Issue creating home folders using a vbscript

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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBS file using code from 2nd file (txt or vbs) 4 36
Check folder every for files and print them 5 37
VBA & VBSCRIPT: re-adapt log file 13 26
Clear Filter 8 38
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…
When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 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