Unsolved
This post is more than 5 years old
9 Posts
0
1829
Using powershell to add share permissions to VNX CIFS share
I trying to see if there is anyway possible to add SMB Share permissions to a share that I have created on our VNX 5600.
Is it possible to create a powershell script to grab the share permissions off one folder, and add them to another folder?
thanks,
Brian
Rainer_EMC
8.6K Posts
1
February 22nd, 2016 07:00
Sure – anything that just uses Win32 CIFS API’s should work as long as it doesnt require a server component like .NET
That’s what you use with your Windows clients explorer or through MMC
Try rmtshare – or sharedup if you just want to duplicate the share
Rainer_EMC
8.6K Posts
1
February 22nd, 2016 08:00
Right – no WMI is what I meant
umichklewis
1.2K Posts
0
February 22nd, 2016 08:00
Look into the "Get-ACL" and "Set-ACl" Cmdlets, for setting NTFS permissions, if you need those as well. You can use "Get-SharePermissions" to get the share permissions from the share and export them for review. A quick Google search can turn up a user-provided script for automating share permissions. Note, however, that you can't use WMI-based scripting, as the VNX doesn't support them.
But, as Rainer pointed out, sharedup is a quick-and-easy way to just copy share permissions without any scripting necessary.
Hope this helps!
BrianClark1
9 Posts
0
February 22nd, 2016 08:00
Thanks Rainer, I hadn't seen "ShareDUP" before. I will give that a shot.
I was aware of the Win32 CIFS API, however for some reason all the commands/scripts I have made have not worked for me.
Thanks Karl,
I already knew of the get/set-ACL cmdlets. I have tried a vast number of different scripts that I wrote, as well as some that our friends at google turned up with no avail. If I find something, or end up coming up with something that works, I will post it here.
thanks,
Brian