permissions - Remotely Grant server\localuser access to a folder by using PowerShell -


i have 100 servers local folder d:\backupmedia\ exists , every server has local user \backupuser , have grant fullcontrol permission folder localuser using powershell. tried following code works fine domain user not local user following error,

exception calling "setaccessrule" "1" argument(s): "some or identity references not >be translated."

code tried,

foreach ($srvr in get-content .\dev_servers.txt)  { $accountname="backupuser" $right="fullcontrol" $inheritperm="containerinherit, objectinherit" $principal="$srvr\$accountname" $permission =$principal,$right,$inheritperm,"none","allow" $accessrule=new-object system.security.accesscontrol.filesystemaccessrule($permission) $uncpath="\\$srvr\d$\backupmedia" $acl = get-acl $uncpath $acl.setaccessrule($accessrule) set-acl $uncpath -aclobject $acl } 

i found solution similar issue using fileacl utility seems has been abondoned , no more available anywhere.

please me fix issue.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -