question

UmeshSK-1988 avatar image
0 Votes"
UmeshSK-1988 asked IanXue-MSFT answered

Powershell script or cmdlet to add user into folder "auditing"

Hi,
I want to add group "everyone" into audit tab. However, whenever I do using GUI, it gives the error with option to click continue. I want a script or cmdlet or cmd line which can automatically accept (select "continue") so that I no need to keep clicking "continue" button. Please share me the script or cmdlet or cmd line to achieve this.

Error:

"An error occurred while applying security information to

C:\program files\<folder>\folder1\file

Failed to enumerate objects in the container: Access is denied"

         **Continue Cancel.**

Thanks,

Umesh.S.K

windows-server
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered

Hi,

You can set the auditing rules using the Set-Acl cmdlet. The below link could be helpful.

https://technochat.in/set-file-system-auditing-via-powershell/

Please note: Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.