m-dwyer / CryptoBlocker

A script to deploy File Server Resource Manager and associated scripts to block infected users
GNU General Public License v2.0
53 stars 103 forks source link

[request]Script to add deny permission #3

Closed Pafzedog closed 8 years ago

Pafzedog commented 8 years ago

Hello,

I am very interested in your project but I just wanted to extract the script to add "deny permission" for user but I can't find it. In fact I am already running FSRM and I have files screening already configured, it's why I just need the blocking script. Can you share it ?

Thanks

m-dwyer commented 8 years ago

Are you wanting to reuse the code to add a deny permission for a given user and share? You should just be able to call the function DenySharePermission to achieve this.

Pafzedog commented 8 years ago

Yes I am. But I don't know well PowerShell, how do you specify user and share to add "DenySharePermission" ? are there variables I can use ? sorry for dumb question .... this is why I wanted to "see" your script before I made my own.

m-dwyer commented 8 years ago

I think this is the function you're after: https://github.com/m-dwyer/CryptoBlocker/blob/c5c1aa1bcee97dc010c79d38b2df19da4fb6f070/DeployCryptoBlocker.ps1#L100-L133

You just need to pass in the share name, and domain username.

Pafzedog commented 8 years ago

Thanks :)