I want to remove everyone from all non-default shares and add authenticated users with Full control

D Vijayakumar VLR 126 Reputation points
2020-12-05T04:19:08.213+00:00

Hi All,

I want to remove every one only from all non-default shares and add authenticated users with full control, if authenticated users is already have leave it as it is and need to exclude all default share, Admin$ share, IPC$ share all this will do on all remote servers from local machine through power shell script

Any one can help me from this it will be very useful for us.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,550 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 111.1K Reputation points MVP
    2020-12-05T09:22:52.917+00:00

    How "to remove everyone from all non-default shares" you asked already and you got an answer on this:

    https://learn.microsoft.com/en-us/answers/questions/185755/i-want-to-remove-everyone-from-shared-permission-o.html

    You can add authenticated users with full control to the shares with the following cmdlet: Grant-SmbShareAccess
    More details you will find here: https://learn.microsoft.com/en-us/powershell/module/smbshare/grant-smbshareaccess?view=win10-ps

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.