Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

PowerShell LiveCast: ..FileSystemAccessRule Error

I am following along with the webcast from Oct 10, 2019. I am having issue with the permissions portion.

When I type the following, I dont have the option for New

[System.Security.AccessControl.FileSystemAccessRule]::(

 

Any ideas why?

0

Comments

5 comments
Date Votes
  • This is the error message:

    Method invocation failed because [System.Security.AccessControl.FileSystemAccessRule] does not contain a
    method named 'new'.

    0
  • Make sure to put "new" before the parenthesis:

    0
  • 0
  • Ah, you need an = after $newrule.

    $newrule = [System.Security.AccessControl.FileSystemAccessRule]::new(

    0
  • still the same, maybe its a PS Version issue? It works on another machine with PSVersion 5...

    I downloaded NTFSSecurity and getting better results.

    0