I’ve been using this script to create my users folders but I just find that the remote share folder is created with ReadOnly share.
My question is how can I create the share folder with $domainname\domain users with full control?
Invoke-WmiMethod -Class win32_share -name Create -ArgumentList `
@($null,"",100,"hideshare$","",e:\users\hideshare,0) -computername "DestinationSRV"
I’ve found many threads with answers but not with the method I use.
Any ideas?
Try:
The security for this share will only allow the specified username. You need to modify this(add multiple ace’s) to add different groups, add everyone etc..
Source for access-part