Grant domain user access to a network folder by using PowerShell script -
i'm trying domain user pass credentials enable them access networked folder. accomplish decided utilize powershell. here code far.
what heck still missing here accomplish goal? thanks
get-credential $credential = get-credential $username = $credential.username $pass = $credential.password if ( ($username -eq 'user' ) -and ((([runtime.interopservices.marshal]::ptrtostringauto([runtime.interopservices.marshal]::securestringtobstr($pass)) -eq 'pa$$word')) )) { invoke-item \\server\data\staff\fax} or there other more cleaner way of doing this. ok, if powershell not way go i'm open other scripting ways of achieving this.
powershell
No comments:
Post a Comment