Check Folder Persmissions
Posted on 2013-10-13
I have a list of folders and owners as follows :
AD ACCOUNT FOLDER OWNER
Test01 Test01 Administrator
Test02 Test02 Test02
Test03 Test03 Administrator
Therefore, how do I check that the AD account is the owner of the folder and if not change the owner to the AD account.
In reality, I have more that 500+ folders, so I just need to know how I can read a list of folders in to a variable and check each owner compared to the AD account.
I already have a script that changes the owner of a folder, just need to know how to read all those folders into a variable and check each one, I am looking at For-each ....