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

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS