Asked by:
need PowerShell script to apply/remove permissions to servers for windows shared folders

Question
-
Hello,
I have been asked by my boss to write a script. Here are the requirements. Can someone write it for me?
As a Server Admin it is important to understand how to apply permissions to servers without impacting the users. In effort to do this with the most minimal impact need to create these permissions via powershell script.
Acceptance Criteria:
1. Create PowerShell script to review Windows Share Folder and subfolders
2. Check to see if the Share Folder has "Everyone" with Full Permissions.
3. Check to see if the Folder has other permissions applied at the Share Level. If so, Apply Permissions to the Subfolder level instead.
5. Change Permissions at the Share Level to display Everyone "List Content Folder" level for the "Everyone" group.
Goal is to apply permissions via the PowerShell Script:
The script should be able to except parameters such as:
1. The Server Name
2. The Share or Folder Name to apply permissions to
3. The groups to associate with the folder.
4. The Share or Folder Name to remove permissions from - Access to confirm before removal.
5. It should have the ability to add, modify or remove permissions at the Share or Folder level.
6. It should have the option to inherit permissions from parent or not.
7. Test and Validate in local and other non-prod environments
This could be done in Phases:
Phase 1: Enter \\Server\Folder1\Folder2\ location and Apply new permissions to a folder
Phase 2: Enter \\Server\Folder1\Folder2\ location and Group/UserID (group1, or user ID1) to modify permissions for a particular group or user ID.
Phase 3: Enter \\Server\Folder1\Folder2\ location and Group/UserID (group1, or user ID1) to remove permissions from a folderPlease Help. Thanks in advance.
chirag
- Moved by Bill_Stewart Tuesday, November 7, 2017 10:02 PM This is not "scripts on demand" (Seriously?)
Thursday, September 21, 2017 5:52 PM
All replies
-
Hello,
I have been asked by my boss to write a script. Here are the requirements. Can someone write it for me?
As a Server Admin it is important to understand how to apply permissions to servers without impacting the users. In effort to do this with the most minimal impact need to create these permissions via powershell script.
Acceptance Criteria:
1. Create PowerShell script to review Windows Share Folder and subfolders
2. Check to see if the Share Folder has "Everyone" with Full Permissions.
3. Check to see if the Folder has other permissions applied at the Share Level. If so, Apply Permissions to the Subfolder level instead.
5. Change Permissions at the Share Level to display Everyone "List Content Folder" level for the "Everyone" group.
Goal is to apply permissions via the PowerShell Script:
The script should be able to except parameters such as:
1. The Server Name
2. The Share or Folder Name to apply permissions to
3. The groups to associate with the folder.
4. The Share or Folder Name to remove permissions from - Access to confirm before removal.
5. It should have the ability to add, modify or remove permissions at the Share or Folder level.
6. It should have the option to inherit permissions from parent or not.
7. Test and Validate in local and other non-prod environments
This could be done in Phases:
Phase 1: Enter \\Server\Folder1\Folder2\ location and Apply new permissions to a folder
Phase 2: Enter \\Server\Folder1\Folder2\ location and Group/UserID (group1, or user ID1) to modify permissions for a particular group or user ID.
Phase 3: Enter \\Server\Folder1\Folder2\ location and Group/UserID (group1, or user ID1) to remove permissions from a folderPlease Help. Thanks in advance.
- Edited by Chirag_US(MCSE) Wednesday, September 20, 2017 5:40 PM
- Changed type Chirag_US(MCSE) Thursday, September 21, 2017 5:50 PM need script
- Merged by jrv Thursday, September 21, 2017 6:02 PM DUPLICATE
Wednesday, September 20, 2017 2:08 PM -
Please review the following:
Please read this first: This forum is for scripting questions rather than script requests
Also find scripts here: http://gallery.technet.microsoft.comLearn PowerSHell: https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276
\_(ツ)_/
- Proposed as answer by Albert LingMicrosoft contingent staff Thursday, September 21, 2017 2:33 AM
Wednesday, September 20, 2017 2:21 PM -
Same post as before.
Please read this first: This forum is for scripting questions rather than script requests
Also find scripts here: http://gallery.technet.microsoft.comLearn PowerSHell: https://mva.microsoft.com/en-us/training-courses/getting-started-with-microsoft-powershell-8276
\_(ツ)_/
Thursday, September 21, 2017 5:59 PM -
We do not write scripts on request.
Please look in the Gallery for scripts that do what you ask.
\_(ツ)_/
Thursday, September 21, 2017 6:05 PM