Avatar of Mike Hammer
Mike HammerFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

ms Dfs on 2012. struggling to publish and share new replicated folder with powershell

dfs on Windows 2012 r2

existing dfs name space
I have written a powershell that creates a new replicated folder. adds members. all the usual stuff it shows as published. paths ok.  but ...
the dfs path \\domain.com\fsroot\newfolder doesn’t work.    if I do it manually with share and publish in the gui it works.
so I think I’m missing the share part.  I’ve added new-smb share.  but still no joy.   basically.   how do I share and publish a newly created replicated folder with powershell please
PowershellWindows Server 2012

Avatar of undefined
Last Comment
Mike Hammer
Avatar of Mike Hammer
Mike Hammer
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

sorry don’t have script with me but was just done with ms docs examples.  it makes the folder everything looks ok apart from I can’t use a dfs path to get it.
Avatar of Mike Hammer
Mike Hammer
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

ok what’s not working is ..
$rule= new-object -typename system.security.accesscontrol.filesystemaccessrule -argument $perms
Avatar of Mike Hammer
Mike Hammer
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

$perms is fed from a csv.
Avatar of Mike Hammer
Mike Hammer
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

if I type them in manually to the end of that command it works
Avatar of Mike Hammer
Mike Hammer
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

but is I just look at the results of $perms it’s identical to what I typed in.
ASKER CERTIFIED SOLUTION
Avatar of Mike Hammer
Mike Hammer
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Powershell
Powershell

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.

27K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo