Dear Community
I need help with my script. I wrote a small script to retrive acl information about network share drive. I wanted to output this result to a text file using the same share drive name .
Example :- if my network share drive is \server.example.db.com\test\myshare
Then i want the output file name like myshare.txt
I have tried some stirng manuplation techniques like trim,replace but i could not get the results what i am looking for .
Or
If there is any other way this can be achieved i am glad to hear that as well . Thanks.
$share = Read-Host " Enter full share drive path" $acl = Get-Acl -Path $share Write-Host "Retriving ACL List for the share" $acl.Access | select IdentityReference,FileSystemRights | Format-Table -AutoSize | out-file result.txt