Solved

Remove user rights from a shared folder using powershell

Posted on 2011-09-30
4
463 Views
Last Modified: 2012-05-12
I need to remove a specific user from a network share. Alot of these users are sids or orphans from AD. I want to use powershell to do it.  Can someone setup the code as to what commands I need to do this with?
0
Comment
Question by:SOSNet
  • 2
  • 2
4 Comments
 
LVL 69

Accepted Solution

by:
Qlemo earned 500 total points
ID: 36899545
If you look at http://powershell.com/cs/media/p/2535.aspx, you will see that it is rather complicated to do that (shown by creating a share with setting the permission). You really do not want to rely on ready-to-use tools like subinacls (and (x)cacls) for that purpose?
0
 

Author Comment

by:SOSNet
ID: 36903104
Thank you! I will look at that.  I am trying to remove the old user (old SIDs), from the shares, is what I am trying to accomplish.  I can de-inherit them but cannot get rid of the orphens (Sids) using powershell.  
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 36903139
As shown in that code it isn't easy, so I would not spend much time with solving in PowerShell just for this single purpose. It is different if you use it to learn more about PowerShell, and have similar tasks to accomplish, of course.
0
 

Author Closing Comment

by:SOSNet
ID: 36981291
It works in powrshell 2 but errors in PS1.
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article will help you understand what HashTables are and how to use them in PowerShell.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question