Solved

New-Object : Cannot find an overload for "FileSystemAccessRule" and the argument count: "4".

Posted on 2016-08-04
1
48 Views
Last Modified: 2016-08-04
I am trying to add object inherit and container inherit to a permission statement but I keep getting the error "cannot find an overload for filesustemaccessrule and the argument count:4"  I cant seem to find a solution to the issue.

$Ar = New-Object system.security.accesscontrol.filesystemaccessrule ("$($FirstName[0])$($LastName)","Modify","ObjectInherit","ContainerInherit","Allow")

Open in new window

0
Comment
Question by:Roccat
1 Comment
 

Accepted Solution

by:
Roccat earned 0 total points
Comment Utility
This works. I am not sure why this works and not the code above

$Ar = New-Object system.security.accesscontrol.filesystemaccessrule ("$($FirstName[0])$($LastName)","Modify", "ContainerInherit, ObjectInherit", "None", "Allow")

Open in new window

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Set OWA language and time zone in Exchange for individuals, all users or per database.
A procedure for exporting installed hotfix details of remote computers using powershell
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now