Posts Tagged ‘acl’

Open Powershell As Administrator

Import-Module NTFSSecurity

#Check Existing Access

dir2 “\\?\e:\folde\path\name” -Recurse | Get-NTFSAccess

#Take Ownership

dir2 “\\?\e:\folde\path\name” -Recurse | Set-NTFSOwner -Account “Administrators”

#Add Permissiosn

dir2 “\\?\e:\folde\path\name” -Recurse | Add-NTFSAccess -Account Administrators -AccessRights FullControl

#recheck Access

dir2 “\\?\e:\folde\path\name” -Recurse | Get-NTFSAccess

Prove access for a user

Get-ChildItem -Path c:\docs -Recurse -Directory | Get-NTFSEffectiveAccess -Account ‘corp\confroom’ | select Account, AccessControlType, AccessRights, FullName

GD Star Rating
loading...
GD Star Rating
loading...