Activating an directory sharing
hi
using the powershell for windows 7 sp1, how i set users/groups with their permission share a directory and then how i activate it?
thanks
bye
balubeto
i created this function:
function new-share ($foldername, $sharename) { # test existence of folder, if not there create # if (!(test-path $foldername)) { new-item $foldername -type directory } # create share check make sure isn’t there # if (!(get-wmiobject win32_share -filter “name=$sharename”) {
$shares=[wmiclass]”win32_share”$shares.create($foldername,$sharename,0) } }
but i unable to add instructions for adding users/groups (with permission) authorized access new resource.
so, how do this?
thanks
bye
balubeto
Windows Server > Windows PowerShell
Comments
Post a Comment