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

Popular posts from this blog

Generating Event ID 91, 44 with CA (In Event Viewer with source as Certsvc)

Group policy default policy cannot be edited because network name not found

Problem when changing update source