- Trending Categories
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
- Related Articles
- How to view folder NTFS permission with PowerShell?
- How to get the Shared folder permissions with PowerShell?
- How to share a windows folder using PowerShell?
- How to remove windows folder sharing using PowerShell?
- How to get the folder size using PowerShell?
- How to get the list of shared folders using PowerShell?
- How to change the permission of a file using Python?
- How to change the permission of a directory using Python?
- How to change Pagefile settings using PowerShell?
- How to access data/data folder in Android device?
- How to change the Drive letter using PowerShell?
- How to access images inside a public folder in Laravel?
- How to change files and folders attributes using PowerShell?
- How to change PowerShell ISE font Size using command?
- How to change the local disk name using PowerShell?

Advertisements