Jump to content

Recommended Posts

Posted
Hi All,

 

I'm looking to see if anyone knows of a way to give timed access to a shared folder ?

 

thanks in advance !

 

Power shell script to change perms on a scheduled task? Or if they don’t need to access their account you could setup permitted logon times for the user (assuming you use AD)

Posted
Thanks I did think of this but its going to get messy as the amount of data grows. agree about AD login hours but it means I would need to create 5k accounts. This is all to do with Controlled assessments. I will go back to the drawing board I think.
Posted (edited)

Could a PowerShell script be scheduled that altered the permissions of the share instead, rather than the file permissions?

 

PS: I don't know how to do this in PowerShell, but altering the share permissions is probably a quicker and easier way to shut people out.

Edited by jthompson
Posted

How many are going to access this at once? When you say 5k I'm assuming you don't want all 5k to have access at a single time? If you're talking like 500 one time, and 4500 blocked at that time you're going to have to have some kind of groups setup for them. Or will it be everyone at once, then no-one? There's few ways to do it but just depends which route you're going really.

 

Steve

Posted
Could a PowerShell script be scheduled that altered the permissions of the share instead, rather than the file permissions?

 

PS: I don't know how to do this in PowerShell, but altering the share permissions is probably a quicker and easier way to shut people out.

 

I'm not sure which version of PowerShell they come with, possible 4+, but there are various cmdlets that let you set share permissions:

 

Get-SmbShareAccess

Block-SmbShareAccess

Remove-SmbShareAccess

Unblock-SmbShareAccess

Grant-SmbShareAccess

 

Get-SmbShare

New-SmbShare

Set-SmbShare

Remove-SmbShare

 

They'd do the trick I think

Posted
How about setting the ACL so there is a group with deny read permissions, then use a scheduled powershell script to put them in and out of that group. Only works clearly if they log off so I don't know if that would work in your situation. It is quicker to change group membership than rewrite an ACL over large amounts of data.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...