Jump to content
Sign in to follow this  
lostangel556

Help setting share permissions remotely

Recommended Posts

lostangel556

Im having an few issues setting the security permissions on the folder as well as setting the share permissions.

I've used WMI to share the actual folder but it only has Read only share permissions.

I've seen that i can also use WMI to set the the share and security permissions for the shared folder using Win32_LogicalShareSecuritySetting, and Win32_LogicalFileSecuritySetting but am having difficulty figuring out how to get them to set the permissions.

This is what i have so far

CODE

$strComputer = $Server

$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2")

$objNewShare = $objWMIService.Get("Win32_LogicalShareSecuritySetting")

$objNewShare.SetSecurityDescriptor() ;Not exactly sure what to do from this bit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.