I'm running this script in PowerShell:
Add-NTFSAccess -Path 'C:\MyFolder' -Account PROGRAMMING\IIS_IUSRS -AccessRights FullControl
and I'm getting this error:
Add-NTFSAccess : Cannot bind parameter 'Account'. Cannot convert value "PROGRAMMING\IIS_IUSRS" to type
"Security2.IdentityReference2". Error: "Some or all identity references could not be translated."
At line:1 char:46
+ Add-NTFSAccess -Path 'C:\MyFolder' -Account PROGRAMMING\IIS_IUSRS -AccessRig …
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Add-NTFSAccess], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,NTFSSecurity.AddAccess
What am I doing wrong?
Thanks,
Best Answer
use:
or just
IIS_IUSRS
is a special internal group that you shouldn't/can't prefix with the computer or domain name.For other internal groups you have to use the prefix
NT AUTHORITY
or the equivalent in your language, like:Please note that
Add-NTFSAccess
is not a Windows cmdlets, it's some script that the original poster picked up somewhere but the account names described here should work elsewhere as well.