Skip navigation
PowerShell command prompt

Use PowerShell to Apply Central Access Policy

Q: How can I use PowerShell to set the Dynamic Access Control Central Access Policy that's applied to a folder?

A: Dynamic Access Control allows Central Access Policies to be created that contain Central Access Rules that define the attributes required for a user and device to access the various classifications of data. Once the Central Access Policies are available to file servers, you can use Group Policy to apply the policy to files and folders. You can also use PowerShell to accomplish this. In the following PowerShell code, the File Server Policy is being applied:

$acl = get-acl "C:\Shares\Data\SharedContent" –audit
set-acl "C:\Shares\Data\SharedContent" $acl "File Server Policy"
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish