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

Please sign in to leave a comment.

Didn't find what you were looking for?

New post