- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to change SMB shared folder access permission using PowerShell?
We can use the command Grant-SmbShareAccess to change the shared folder access permission or to assign the new user to the shared folder with permission.
In this example, we have already shared a folder name called “Shared Folder” and everyone's user permission is assigned with the read access and we will change it to the Full access permission.
PS C:\Temp> Get-SmbShareAccess -Name "Shared folder" Name ScopeName AccountName AccessControlType AccessRight ---- --------- ----------- ----------------- ----------- Shared folder * Everyone Allow Read
Example
To change the permission use the below command,
Grant-SmbShareAccess -Name "Shared folder" ` -AccountName "Everyone" ` -AccessRight Full -Force
Output −
Name ScopeName AccountName AccessControlType AccessRight ---- --------- ----------- ----------------- ----------- Shared folder * Everyone Allow Full
Advertisements