<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Change Home Directories to Read Only with only Active Directory Username supplied in Microsoft Virtualization Discussions</title>
    <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129010#M5301</link>
    <description>&lt;P&gt;First, i'm not the NETAPP administrator, i just have access to change permissions on the shares through Windows Tools and/or Powershell. &amp;nbsp;Pretty sure we're using home directory search paths because i can access a users files by going to \\occ01fs010\~username.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now we're using the below script. &amp;nbsp;The problem is, i have to go and find the location on the filer where each users home directory is located. &amp;nbsp;It could be any of the locations i listed earlier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#Load Active Directory Module&lt;BR /&gt;Import-Module activedirectory&lt;/P&gt;&lt;P&gt;$csv = Import-Csv C:\Scripts\Users.csv&lt;BR /&gt;ForEach($line in $csv)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;$Name = $line.Name;&lt;BR /&gt;$Location = $line.Location;&lt;BR /&gt;$Path = "$Location\$Name";&lt;/P&gt;&lt;P&gt;$colRights = [System.Security.AccessControl.FileSystemRights]::ReadAndExecute&lt;BR /&gt;$InheritanceFlag = [System.Security.AccessControl.InheritanceFlags]::ObjectInherit&lt;BR /&gt;$PropagationFlag = [System.Security.AccessControl.PropagationFlags]::None&lt;BR /&gt;$objType =[System.Security.AccessControl.AccessControlType]::Allow&lt;BR /&gt;#$flags = [Security.AccessControl.InheritanceFlags]($InheritanceFlag::ContainerInherit -bor $InheritanceFlag::ObjectInherit)&lt;/P&gt;&lt;P&gt;$objACL = Get-ACL $Path&lt;/P&gt;&lt;P&gt;#$objUser = New-Object System.Security.Principal.NTAccount("na\$name")&lt;BR /&gt;#$objUser = New-Object Security.AccessControl.FileSystemAccessRule ((New-Object System.Security.Principal.NTAccount("na\$name")),$colRights, $InheritanceFlag, $PropagationFlag, $objType)&lt;/P&gt;&lt;P&gt;$objACE = New-Object Security.AccessControl.FileSystemAccessRule `&lt;BR /&gt;("na\$Name", $colRights, $InheritanceFlag, $PropagationFlag, $objType)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$objACL.SetAccessRule($objACE)&lt;/P&gt;&lt;P&gt;Set-ACL $Path $objACL&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2017 15:55:50 GMT</pubDate>
    <dc:creator>natemclean</dc:creator>
    <dc:date>2017-03-14T15:55:50Z</dc:date>
    <item>
      <title>How to Change Home Directories to Read Only with only Active Directory Username supplied</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129007#M5299</link>
      <description>&lt;P&gt;I'm looking to take a list of Active Directory usernames, poll Active Directory for the Home Directory which shows as \\occ01fs010\~username, and then alter the share for the users home directory to read only. &amp;nbsp;The problem i can't figure out is how to get the script to find and use the absolute path since it can't find \\dfsservername\~username. &amp;nbsp;The user could reside anywhere on these locations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;\\occ01fs010\home1$\users1&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;\\occ01fs010\home1$\users2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;\\occ01fs010\home1$\users3&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;\\occ01fs010\home1$\users4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;\\occ01fs010\home2$&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;\\occ01fs010\home3$&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;\\occ01fs010\home4$&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help or pointers would be greatly appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 15:19:50 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129007#M5299</guid>
      <dc:creator>natemclean</dc:creator>
      <dc:date>2025-06-04T15:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Change Home Directories to Read Only with only Active Directory Username supplied</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129008#M5300</link>
      <description>&lt;P&gt;First, let me ask this, what version of ontap, 7-mode or cdot, and are you saying that you aren't using the homedirectory search paths and you are using a 1:1 share ratio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it's the latter b/c your home shares start with ~user, but with home-directory search path this is usually a home directory.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see if I can assist once you reply&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 15:18:46 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129008#M5300</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2017-03-14T15:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to Change Home Directories to Read Only with only Active Directory Username supplied</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129010#M5301</link>
      <description>&lt;P&gt;First, i'm not the NETAPP administrator, i just have access to change permissions on the shares through Windows Tools and/or Powershell. &amp;nbsp;Pretty sure we're using home directory search paths because i can access a users files by going to \\occ01fs010\~username.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now we're using the below script. &amp;nbsp;The problem is, i have to go and find the location on the filer where each users home directory is located. &amp;nbsp;It could be any of the locations i listed earlier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#Load Active Directory Module&lt;BR /&gt;Import-Module activedirectory&lt;/P&gt;&lt;P&gt;$csv = Import-Csv C:\Scripts\Users.csv&lt;BR /&gt;ForEach($line in $csv)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;$Name = $line.Name;&lt;BR /&gt;$Location = $line.Location;&lt;BR /&gt;$Path = "$Location\$Name";&lt;/P&gt;&lt;P&gt;$colRights = [System.Security.AccessControl.FileSystemRights]::ReadAndExecute&lt;BR /&gt;$InheritanceFlag = [System.Security.AccessControl.InheritanceFlags]::ObjectInherit&lt;BR /&gt;$PropagationFlag = [System.Security.AccessControl.PropagationFlags]::None&lt;BR /&gt;$objType =[System.Security.AccessControl.AccessControlType]::Allow&lt;BR /&gt;#$flags = [Security.AccessControl.InheritanceFlags]($InheritanceFlag::ContainerInherit -bor $InheritanceFlag::ObjectInherit)&lt;/P&gt;&lt;P&gt;$objACL = Get-ACL $Path&lt;/P&gt;&lt;P&gt;#$objUser = New-Object System.Security.Principal.NTAccount("na\$name")&lt;BR /&gt;#$objUser = New-Object Security.AccessControl.FileSystemAccessRule ((New-Object System.Security.Principal.NTAccount("na\$name")),$colRights, $InheritanceFlag, $PropagationFlag, $objType)&lt;/P&gt;&lt;P&gt;$objACE = New-Object Security.AccessControl.FileSystemAccessRule `&lt;BR /&gt;("na\$Name", $colRights, $InheritanceFlag, $PropagationFlag, $objType)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$objACL.SetAccessRule($objACE)&lt;/P&gt;&lt;P&gt;Set-ACL $Path $objACL&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 15:55:50 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129010#M5301</guid>
      <dc:creator>natemclean</dc:creator>
      <dc:date>2017-03-14T15:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Change Home Directories to Read Only with only Active Directory Username supplied</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129012#M5302</link>
      <description>&lt;P&gt;I was able to figure this out. &amp;nbsp;I removed the location part of the script and altered the path in the script. &amp;nbsp;Couple of tweaks to my inheritance and it's exactly what i needed. &amp;nbsp;Glad i came to the Netapp site to understand some things.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#Load Active Directory Module&lt;/P&gt;&lt;P&gt;Import-Module activedirectory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$csv = Import-Csv C:\Scripts\Users.csv&lt;/P&gt;&lt;P&gt;ForEach($line in $csv)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$Name = $line.Name;&lt;/P&gt;&lt;P&gt;$Path = "\\OCC01FS011\~$Name";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$colRights = [System.Security.AccessControl.FileSystemRights]"DeleteSubdirectoriesAndFiles, Delete, ReadAndExecute"&lt;/P&gt;&lt;P&gt;$InheritanceFlag = [System.Security.AccessControl.InheritanceFlags]::ContainerInherit -bor [System.Security.AccessControl.InheritanceFlags]::ObjectInherit&lt;/P&gt;&lt;P&gt;$PropagationFlag = [System.Security.AccessControl.PropagationFlags]::None&lt;/P&gt;&lt;P&gt;$objType =[System.Security.AccessControl.AccessControlType]::Allow&lt;/P&gt;&lt;P&gt;#$flags = [Security.AccessControl.InheritanceFlags]($InheritanceFlag::ContainerInherit -bor $InheritanceFlag::ObjectInherit)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$objACL = Get-ACL $Path&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#$objUser = New-Object System.Security.Principal.NTAccount("na\$name")&lt;/P&gt;&lt;P&gt;#$objUser = New-Object Security.AccessControl.FileSystemAccessRule ((New-Object System.Security.Principal.NTAccount("na\$name")),$colRights, $InheritanceFlag, $PropagationFlag, $objType)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$objACE = New-Object Security.AccessControl.FileSystemAccessRule `&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ("na\$Name", $colRights, $InheritanceFlag, $PropagationFlag, $objType)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$objACL.SetAccessRule($objACE)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set-ACL $Path $objACL&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 16:54:26 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129012#M5302</guid>
      <dc:creator>natemclean</dc:creator>
      <dc:date>2017-03-14T16:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to Change Home Directories to Read Only with only Active Directory Username supplied</title>
      <link>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129014#M5303</link>
      <description>&lt;P&gt;Ok, let's clear things up again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you talking share permissions are NTFS permissions on the directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if you don't have Netapp rights, it looks like you are some sort of windows administrator and could be a built in administrator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, Those are the .Net raw cmds, but I find it easier to use a microsoft community supplied module ntfssecurity for ntfs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://gallery.technet.microsoft.com/scriptcenter/1abd77a5-9c0b-4a2b-acef-90dbb2b84e85" target="_blank"&gt;https://gallery.technet.microsoft.com/scriptcenter/1abd77a5-9c0b-4a2b-acef-90dbb2b84e85&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Download, put it into your modules directory, put path in your profile and import&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That module is amazing and uses alphafs.dll which is a customized dll that was communitiy developed to help with windows permissions. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have all been waiting for native permissioning in powershell for a long time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, there are tons of native cmdlets for netapp&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 17:24:49 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Microsoft-Virtualization-Discussions/How-to-Change-Home-Directories-to-Read-Only-with-only-Active-Directory-Username/m-p/129014#M5303</guid>
      <dc:creator>JGPSHNTAP</dc:creator>
      <dc:date>2017-03-14T17:24:49Z</dc:date>
    </item>
  </channel>
</rss>

