这是我到目前为止没有运气的尝试:
Grant-SmbShareAccess –Name $ShareName –AccountName $_ –AccessRight ("Read,Change") -Force;
Grant-SmbShareAccess –Name $ShareName –AccountName $_ –AccessRight "Read,Change" -Force;
Grant-SmbShareAccess –Name $ShareName –AccountName $_ –AccessRight Read,Change -Force;
如果我运行如下命令:
Grant-SmbShareAccess –Name $ShareName –AccountName $_ –AccessRight Change -Force;
Grant-SmbShareAccess –Name $ShareName –AccountName $_ –AccessRight Read -Force;
在这种情况下它只保留最新的权限,Read
丢失Change
了
看一看: