|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
![]() hi everyone , i need a script which list me ACL enteries whose permission are explicitly assigned and not inherited is there anyway in which i can do that, how can i get that, i am having folder in C:\ drive named AAA whose inheritance permission are disabled to the child folder ,i am creating folder named BBB under AAA and i am adding explicit permissions to one of the user (eg:vivek) to BBB folder when i look at the Advanced setting of the folder security permission i will get the following on ACL entries list Type: Name: Permission: inheritedfrom: Applyto: Allow vivek.M FullControl <not inherited> this folder ,subFolder,files Allow System FullControl C:\AAA this folder ,subFolder,files i need to pull or get only the first line of result whose inheritedfrom: are <not inherited> important vivek.m is explicty assigned to the particular folder by using ADD fuction on Advance security tab how can i get reply me............ |
#2
| |||
| |||
Re: need vbscript to pull explicit assigned permission on folder which are not inherited To set folder permissions in VBScript Code: 'This script will assign Modify/C-Change (write) Permission To Power User on "C:\MyFolder" using cacls on NTFS formatted drive Dim oShell, FoldPerm, Calcds, oFSO Set oFSO = CreateObject("Scripting.FileSystemObject") Set oShell = CreateObject("WScript.Shell") sSysDir = oFSO.GetSpecialFolder(1).Path If Right(sSysDir,1) <> "\" Then sSysDir = sSysDir & "\" Calcds = sSysDir & "cacls.exe" 'Chang The folder Name, User and Access rights in the following line of code FoldPerm = """" & Calcds &"""" & """C:\MyFolder""" & " /E /T /C /G " & """Power Users""" & ":C" oShell.Run FoldPerm, 1 ,True |
#3
| |||
| |||
Re: need vbscript to pull explicit assigned permission on folder which are not inherited Have you tried Windows Management Instrumentation (WMI) http://msdn.microsoft.com/library/de...itysetting.asp Please have a look at Microsoft 1. http://support.microsoft.com/default...b;en-us;266461 2. http://support.microsoft.com/default...b;en-us;269159 I hope this helps you. |
![]() |
|
Tags: active directory, advance security tab, folder security permission, vbscript |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Maybe a VBScript to pull email addresses? | Modom | Active Directory | 1 | 03-08-2011 04:21 PM |
how to pull local group members in vbscript? | vivekmohan | Software Development | 3 | 25-07-2009 01:52 PM |
how to pull NTFS security permission in vbscript | vivekmohan | Software Development | 3 | 25-07-2009 01:28 PM |
How to Change Permission in VBScript | Quattro | Software Development | 3 | 09-06-2009 08:44 AM |
Microsoft VBScript runtime error: Permission denied: 'GetObject' | Swati_here_2008 | Software Development | 3 | 05-05-2008 01:57 PM |