1

I'm trying to create a folder hierarchy for my projects using Powershell. The main project folder will not be connected to a target. The subfolders will be connected to targets on four different servers.

\\domain\production (namespace)
-projects

--000p_company_dfs_test01 (no target)
---comp (with target)
---images (with target)
---admin (with target)

--001p_company_dfs_test02 (no target)
---comp (with target)
---images (with target)
---admin (with target)

I'm having no trouble defining the hierarchies using the DFS Management window, but I can't get my head around what command I need to use to create the targetless project folders.

I have tried using New-DfsnFolder, but this command need a target-argument:

New-DfsnFolder -Path ("\\domain\production\projects\" +$project +"\")

I have also tried to add the folder using the following command:

New-Item -ItemType "directory" -Path ("\\domain\production\projects\" +$project +"\")

The command return: "Access to the path '001p_company_dfs_test02' is denied"

Powershell version:

Major  Minor  Build  Revision
-----  -----  -----  --------
3      0      -1     -1 

Any suggestions?

Best, Lars Erik

1
  • There is two ways to do this: --------------------DFSUtil Link Add "DFSUtil Link Add "\\domain\production\projects\001p_company_dfs_test02\images" "\\server1\projects\001p_company_dfs_test02\images"-------------And:-----------New-DfsnFolderTarget -Path \\domain\production\projects\001p_company_dfs_test02\images -TargetPath \\domain\production\projects\001p_company_dfs_test02\images Commented Oct 24, 2013 at 21:43

2 Answers 2

1

The solution was surprisingly simple. Create the subfolders with targets and the parent folder will be generated automatically. There is two ways to do this:

DFSUtil Link Add "DFSUtil Link Add "\\domain\production\projects\001p_company_dfs_test02\images" "\\server1\projects\001p_company_dfs_test02\images"

Or:

Ne‌​w-DfsnFolderTarget -Path \\domain\production\projects\001p_company_dfs_test02\images -TargetPath \\domain\production\projects\001p_company_dfs_test02\images
Sign up to request clarification or add additional context in comments.

Comments

0
Ne‌​w-DfsnFolderTarget -Path \\domain\production\projects\001p_company_dfs_test02\images -TargetPath \\domain\production\projects\001p_company_dfs_test02\images

is not the same as what is pictured below. dfs pic

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.