locked
Windows Server 2008 R2: set foldershare Permissions RRS feed

  • Question

  • Hi,

    I need to set the "deny" for a few shares.
    The group grp_Blacklist should be denied access on share level.
    I can't use NTFS permissions, because i don't want changes on this level on my very complex folder structure.

    I know this isn't best practice. But in this case I need the setting just like that.

    Does anyone have an example of how this works with WMI, for example?

    thanks,

    Best Regards,
    Ralf

    Monday, October 28, 2019 3:09 PM

All replies

  • Google is your friend

    https://4sysops.com/archives/managing-windows-file-shares-with-powershell/

    Block-SmbShareAccess -Name Logs -AccountName corp\AppUsers -Force


    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful. (99,108,97,121,109,97,110,50,64,110,121,99,97,112,46,114,114,46,99,111,109|%{[char]$_})-join''


    • Edited by clayman2 Monday, October 28, 2019 4:17 PM edit
    Monday, October 28, 2019 4:14 PM
  • My google tells me, that smbshare modules arent available for w2008 r2
    Monday, October 28, 2019 4:23 PM
  • My google tells me, that smbshare modules arent available for w2008 r2

    You are correct :-)

    But google still is your friend. Doesn't look as easy as Block-SmbShareAccess, but it is what it is. Should move to server 2016 as I believe support for 2008 is going bye bye.

    https://www.itprotoday.com/powershell/managing-file-shares-windows-powershell


    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful. (99,108,97,121,109,97,110,50,64,110,121,99,97,112,46,114,114,46,99,111,109|%{[char]$_})-join''

    Monday, October 28, 2019 4:40 PM
  • WS2008r2 is gone as of next month.

    Normally we use NTFS security to set permissions in a domain.  Share security is mostly used for non-domain hosts.  It is also much harder to manage.


    \_(ツ)_/

    Monday, October 28, 2019 5:26 PM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Lee

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, November 8, 2019 1:06 PM