{"id":4542,"date":"2025-05-21T18:35:00","date_gmt":"2025-05-21T17:35:00","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=4542"},"modified":"2025-05-21T18:35:00","modified_gmt":"2025-05-21T17:35:00","slug":"setting-ntfs-permissions-on-a-folder-through-intune","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2025\/05\/setting-ntfs-permissions-on-a-folder-through-intune\/","title":{"rendered":"Setting NTFS permissions on a Folder through Intune"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2025\/05\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"289\" src=\"https:\/\/www.lieben.nu\/liebensraum\/wp-content\/uploads\/2025\/05\/image.png\" alt=\"\" class=\"wp-image-4543\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2025\/05\/image.png 793w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2025\/05\/image-300x109.png 300w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2025\/05\/image-768x280.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Although I found a good example\/article on how to set <a href=\"https:\/\/sysmansquad.com\/2020\/07\/27\/setting-acl-using-intune-endpoint-analytics-proactive-remediations\/\">modify permission through Intune<\/a>, I wanted to use more of a desired state configuration type remediation where inheritance is removed and all defined ACL&#8217;s are exclusively applied to a given folder and all child folders\/files. It also includes creating the folder if it isn&#8217;t there yet, which can be useful for certain legacy applications \ud83d\ude42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Without further ado here&#8217;s the detection script:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/jflieben\/assortedFunctionsV2\/blob\/main\/NTFSPermissionRemediation\/detect.ps1\">https:\/\/github.com\/jflieben\/assortedFunctionsV2\/blob\/main\/NTFSPermissionRemediation\/detect.ps1<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And here is the remediation script:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/jflieben\/assortedFunctionsV2\/blob\/main\/NTFSPermissionRemediation\/remediate.ps1\">https:\/\/github.com\/jflieben\/assortedFunctionsV2\/blob\/main\/NTFSPermissionRemediation\/remediate.ps1<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run in SYSTEM context unless you unwisely made all your users local admins \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Although I found a good example\/article on how to set modify permission through Intune, I wanted to use more of a desired state configuration type remediation where inheritance is removed and all defined ACL&#8217;s are exclusively applied to a given folder and all child folders\/files. It also includes creating the folder if it isn&#8217;t there &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2025\/05\/setting-ntfs-permissions-on-a-folder-through-intune\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Setting NTFS permissions on a Folder through Intune<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[12,22,39,43],"tags":[],"class_list":["post-4542","post","type-post","status-publish","format-standard","hentry","category-ems","category-intune","category-powershell","category-security"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/4542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=4542"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/4542\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=4542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=4542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=4542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}