troubleshooting Question

write a power shell script to create many folders in a win2k8 cluster server drive.

Avatar of nav2567
nav2567Flag for United States of America asked on
Windows Server 2003Windows Server 2008
2 Comments1 Solution344 ViewsLast Modified:
Hello,

In our win2k3/win2k server environment, we use to have a folders.txt which contains the folders we want to create, and we basically run a bat file like the following and that is.  
for /f %%i in (folders.txt) do md d:\%%i
for /f %%i in (folders.txt) do net share %%i$=d:\%%i
for /f %%i in (folders.txt) do cacls d:\%%i /e /t /c /g mydomain\%%i:f
for /f %%i in (folders.txt) do cacls d:\%%i /e /t /c /g mydomain\helpdesk_:f
for /f %%i in (folders.txt) do subinacl /subdirectories d:\%%i /setowner=mydomain\%%i
for /f %%i in (folders.txt) do subinacl /subdirectories d:\%%i\*.* /setowner=mydomain\%%i

We are trying to accomplish the similar in a Win2k8 Cluster Server.  Can we use the above?  I was told I should use powershell script but I am not familiar.  

It will be great if someone can advice some commands to use or examples.  

Many thanks.
ASKER CERTIFIED SOLUTION
kevinhsieh
Network Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros